Galaxy annotations and ranking galaxy visualization/list #97
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes included in this PR:
Reformatted some of the elements in the galaxy tool tip (RA, DEC, Score, Distance). This is just a small change (in
function.py) to the rounding of each element in the pop up that occurs when a user clicks on a galaxy in the visualization for a particular event.Added a link to the NED search page for the particular galaxy into the tool tip (see
function.py).Sorted the list of galaxies by rank, so the first galaxy in the list is rank 0 (see the changes in
ajaxrequests.py).Added a field under the Galaxies tab that can limit the number of galaxies shown on the visualization to the user input value. Similar to before, the 'Get' button does load in all galaxies available at the beginning, but there is now a user-input field to change what is shown on the page. This allows for quick updates to the visualization and list based on user input (either by hitting 'enter' or by focusing on a different field). The default number of galaxies to visualize is now 100, but a user can still see all galaxies on the visualization by making the user input field blank. This required a major re-write of the alert_event_galaxies function, and is the bulk of the work done here. Note that the refreshing of aladin markers was a little tricky, and was solved by setting a global galaxy list that is updated on a field change. I'm sure there is a better way of doing this, so please do let me know (see changes in
alert_info.html).These changes were all tested on a recent local copy of TM, by selecting different events (ex: S251112cm, S251021u, and others), loading the galaxy list for each event, and checking the tool tips and galaxy list for different field inputs. Various field inputs were tested including scientific notation, no input, numbers out of bounds, and non-integers or strings.