Skip to content

Moved functionality of LCO photometric and spectroscopic observation submission to SNEx2.#154

Open
moira-andrews wants to merge 35 commits intodevfrom
snex2_scheduling
Open

Moved functionality of LCO photometric and spectroscopic observation submission to SNEx2.#154
moira-andrews wants to merge 35 commits intodevfrom
snex2_scheduling

Conversation

@moira-andrews
Copy link
Collaborator

@moira-andrews moira-andrews commented Feb 26, 2026

The cadence strategies mostly inherit from the TOM base cadence strategies, but are customized to pass the reminder_date through the next cadence as a parameter. The RetryFailedObservationsStrategy has 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.py to custom_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 runcadencestrategies for 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.

moira-andrews and others added 30 commits February 10, 2026 14:20
…y for reminders, added hours vs days for cad frequency
@moira-andrews moira-andrews self-assigned this Feb 26, 2026
@moira-andrews moira-andrews added the enhancement New feature or request label Feb 26, 2026
@moira-andrews moira-andrews linked an issue Feb 26, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move Scheduling to SNEx2

2 participants