Skip to content

Commit

Permalink
create_petalnz_pdf(): look for redrock*fits instead of zmtl*fits
Browse files Browse the repository at this point in the history
  • Loading branch information
araichoor committed Dec 22, 2023
1 parent 3e095a3 commit 5bb618e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion py/desispec/night_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -1437,13 +1437,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 = fn.replace("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 5bb618e

Please sign in to comment.