Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

robust to missing exposure tables #1211

Merged
merged 1 commit into from Mar 26, 2021
Merged

robust to missing exposure tables #1211

merged 1 commit into from Mar 26, 2021

Conversation

sbailey
Copy link
Contributor

@sbailey sbailey commented Mar 26, 2021

This PR fixes #1210 by making desi_tile_redshifts robust to missing exposure tables, e.g. from early data in the daily runs. If the table is missing after 20201201, it logs an error because we do expect those to exist, but it still continues. Prior to 20201201 it will use a table if it finds it (e.g. for reruns of early commissioning data), but it won't log an error if missing.

@sbailey sbailey requested a review from akremin March 26, 2021 18:14
@coveralls
Copy link

Coverage Status

Coverage remained the same at 29.01% when pulling 6d65621 on noexptable into ef67515 on master.

Copy link
Member

@akremin akremin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this using the command that failed in the original issue #1210. I ran it and the code worked as advertised:

desi_tile_redshifts --night ${YESTERDAY} --group cumulative --nosubmit

INFO:desi_tile_redshifts:323:<module>: Loading production exposure tables for nights [20210325]
INFO:desi_tile_redshifts:377:<module>: 1 tiles; searching for exposures on prior nights
INFO:desi_tile_redshifts:390:<module>: Tile 80607 nights=[20201214 20201215 20201218 20201219 20201222 20210211 20210213 20210304
 20210313 20210318 20210319 20210325] expids=[67744 67765 67766 67767 67768 68027 68028 68662 68663 68664 68666 68844
 68845 68846 68847 69440 69441 69442 75266 75657 79223 80245 80893 81000
 81001 81935 81937]
INFO:desi_tile_redshifts:239:batch_tile_redshifts: Wrote /global/cfs/cdirs/desi/spectro/redux/daily/run/scripts/tiles/cumulative/80607/20210325/coadd-redshifts-80607-thru20210325.slurm

It was also true that those exposures were not genuine science data so I flagged them to be ignored and reran to test if the code worked in that scenario. It worked as expected there as well:

desi_tile_redshifts --night ${YESTERDAY} --group cumulative --nosubmit

INFO:desi_tile_redshifts:323:<module>: Loading production exposure tables for nights [20210325]
CRITICAL:desi_tile_redshifts:370:<module>: No exposures left after filtering by tileid/night/expid

@akremin akremin merged commit 87b4896 into master Mar 26, 2021
@akremin akremin deleted the noexptable branch March 26, 2021 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exposure tracking in desi_tile_redshifts
3 participants