submit cumulative redshifts only for lastnight of each tile #1955
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.
This PR adds support to desi_run_night to submit cumulative redshifts only for tiles for which the current night is the last night that they were observed. This allows them to be tracked in the processing tables (see issue #1952) while not submitting cumulative redshift jobs for nights earlier than the LASTNIGHT for each tile.
I did not implement an option to override this and submit cumulative redshifts for every tile, even if they have future observations (current behavior). The code is already complex from supporting tilenight, non-tilenight, productions, and daily-like "is this the last exposure for this tile or the end of the night?" style logic, and I didn't want to add additional options that we may never use and then feel obligated to support those in any future refactors. If we find we need that functionality, we can add it later.
Tests
I tested on the following nights, to cover several cases:
The resulting jobgraphs in https://data.desi.lbl.gov/desi/users/sjbailey/spectro/redux/zproc/run/jobgraph/ show that all tiles get perexp redshift jobs, but only some tiles get cumulative redshift jobs. I used code like the following to identify which tiles are supposed to get cumulative jobs:
I repeated with
desi_run_night --no-use-tilenight ...
to make sure that variant of the logic works too.