Skip to content

Commit

Permalink
find zbest if no redrock
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Sep 13, 2024
1 parent 5ed898f commit d1c76e4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion py/desispec/scripts/zcatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,12 @@ def main(args=None):
if len(tmp) > 0:
redrockfiles.append(tmp)
else:
log.error(f'no redrock files found in {indir}/{tileid}')
log.warning(f'No redrock files found in {indir}/{tileid}. Checking for zbest files.')
tmp = sorted(glob.glob(f'{indir}/{tileid}/*/zbest-*.fits'))
if len(tmp) > 0:
redrockfiles.append(tmp)
else:
log.error(f'No redrock OR zbest files found in {indir}/{tileid}!')

#- convert list of lists -> list
redrockfiles = list(itertools.chain.from_iterable(redrockfiles))
Expand Down

0 comments on commit d1c76e4

Please sign in to comment.