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

create_petalnz_pdf(): look for redrock*fits instead of zmtl*fits #2151

Merged
merged 2 commits into from Dec 22, 2023

Conversation

araichoor
Copy link
Contributor

With this PR, the night_qacreate_petalnz_pdf() now parses the redrock*fits files to identify the processed petals, instead of the zmtl*fits file.

It addresses https://desisurvey.slack.com/archives/C01HNN87Y7J/p1703203812637849.
I.e. when we archived+mtl-updated a tile, then realized a petal was bad, so we re-process the tile, with creating a "dummy" zmtl*fits file (but no redrock or other files).
The create_petalnz_pdf() function was looking for zmtl*fits files to parse the existing petals.
Here it would find the "dummy" zmtl*fits file, but then crash as there s no redrock*fits file.

I ve successfully run on night here: https://data.desi.lbl.gov/desi/users/raichoor/nightqa_dev/nightqa_v25/20231209/.

@sbailey
Copy link
Contributor

sbailey commented Dec 22, 2023

Thanks for the quick fix. As a maintenance detail, I changed fn.replace('redrock', 'zmtl') to desispec.io.util.replace_prefix(fn, "redrock", "zmtl") which will replace only the prefix of the filename, but not other places where "redrock" might appear, e.g. in a SPECPROD="test_redrock" path.

@sbailey sbailey merged commit f2c25b6 into main Dec 22, 2023
24 checks passed
@sbailey sbailey deleted the nightqa_v25 branch December 22, 2023 02:48
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.

None yet

2 participants