Skip to content

Commit

Permalink
use better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Waelthus committed Nov 5, 2024
1 parent fe88bbd commit 87922ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/desi_make_dark_tables
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ for files,outfile in zip([dark_files,bias_files],
files_new = [f for f in files if f.replace(f"{args.indir}/","") not in outtab['FILENAME']]
else:
files_new = files
if len(files_new)==0:
raise ValueError(f"No new files found in {args.indir} to add to {outfile}")
for fi in files_new:
with fits.open(fi, "readonly") as f:
det = f[0].header["DETECTOR"]
Expand Down

0 comments on commit 87922ab

Please sign in to comment.