Moved functionality of LCO photometric and spectroscopic observation submission to SNEx2.#154
Open
moira-andrews wants to merge 35 commits intodevfrom
Open
Moved functionality of LCO photometric and spectroscopic observation submission to SNEx2.#154moira-andrews wants to merge 35 commits intodevfrom
moira-andrews wants to merge 35 commits intodevfrom
Conversation
…y for reminders, added hours vs days for cad frequency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The cadence strategies mostly inherit from the TOM base cadence strategies, but are customized to pass the
reminder_datethrough the next cadence as a parameter. TheRetryFailedObservationsStrategyhas been customized to work in the same way that SNEx1 "Once in the next. . . " cadence strategy behaved.All SNEx1 hooks and database syncs have been removed unless necessary. The target, phot, and spec syncing has remained until there is an alternative way for the pipeline to update data on SNEx2. All other comment, user interest, observation syncing has been removed. I've also gone through and removed unused imports and large commented out unnecessary functions.
Scheduling page logic has been moved and refactored from
custom_code.views.pytocustom_code.scheduling_logic.py. This includes saving comments, prompting the user for continuing, modifying, and stopping sequences in the same logic as before.The Photometric and Spectroscopic Sequence LCO facility submission forms have been updated to build the proper configurations for submission. Muscat 2m imager was added as a valid instrument to the photometric sequence form and can be successfully submitted. Configurations have been hard coded within the form to match what SNEx1 submission hard coded. I also added fields for cadence_frequency in days or hours, since TOM takes cadence_frequency in hours, but we often display it as days. On the form end, this takes a frequency value and unit (hours or days), and converts it into the fields necessary for TOM processing and SNEx2 use. This is only on the initial submission page. The scheduling page only uses cadences in days.
With this, I added some javascript to update the form reminders for taking in different cadence frequencies. I also added some javascript to handle the filters displayed for different instrument options. For muscat, only 1 exposure time is accepted, for 0.4m, only the valid filters are shown and the rest are set to 0 with our defaults.
Validation and visibility errors are handled on the initial submission form and on modifying a sequence from the scheduling page. On continuing a sequence, if there are validation errors they do not currently appear. Unless this is deemed as mission critical, I plan to implement this functionality, along with better handling and displaying of OCS errors from scheduling page and the observation detail page. Currently the OCS errors live in the output of
./manage.py runcadencestrategiesfor targets that are no longer visible within the window that used to be valid (object has set, moon distance is now to close, etc). See #155 for an example output.