Skip to content

Commit

Permalink
Merge pull request #2151 from desihub/nightqa_v25
Browse files Browse the repository at this point in the history
create_petalnz_pdf(): look for redrock*fits instead of zmtl*fits
  • Loading branch information
sbailey authored Dec 22, 2023
2 parents 3e095a3 + fcee794 commit f2c25b6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion py/desispec/night_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
# AR desispec
from desispec.fiberbitmasking import get_skysub_fiberbitmask_val
from desispec.io import findfile
from desispec.io.util import replace_prefix
from desispec.calibfinder import CalibFinder
from desispec.scripts import preproc
from desispec.tile_qa_plot import get_tilecov
Expand Down Expand Up @@ -1437,13 +1438,21 @@ def create_petalnz_pdf(
log.warning("{} : FAPRGRM={} not in bright, dark, proceeding to next tile".format(fn, faprgrm))
continue
# AR reading zmtl files
# AR 20231221: look for redrock files, to handle case of
# AR a reprocessing generates a dummy zmtl file
# AR https://desisurvey.slack.com/archives/C01HNN87Y7J/p1703203812637849
istileid = False
pix_ntilecovs = None
for petal in petals:
fn = findfile('zmtl', night=night, tile=tileid, spectrograph=petal, groupname=group, specprod_dir=prod)
fn = findfile('redrock', night=night, tile=tileid, spectrograph=petal, groupname=group, specprod_dir=prod)
if not os.path.isfile(fn):
log.warning("{} : no file".format(fn))
else:
# AR switching to zmtl
fn = replace_prefix(fn, "redrock", "zmtl")
if not os.path.isfile(fn):
log.warning("{} : no file".format(fn))
continue
istileid = True
d = Table.read(fn, hdu="ZMTL")
# AR rename *DESI_TARGET and *BGS_TARGET to DESI_TARGET and BGS_TARGET
Expand Down

0 comments on commit f2c25b6

Please sign in to comment.