Skip to content

Commit

Permalink
change rs_replace to grab designid_status version first
Browse files Browse the repository at this point in the history
  • Loading branch information
imedan committed Sep 5, 2024
1 parent ad71e97 commit f20c5f7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions bin/validate_designs_batches.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,17 @@ def valid_design_func(file, exp, obsTime, field_desmodes,
files = []
cache_files = []
for fid in fieldids:
files += [file for file in glob.glob(replace_path +
'{plan}_{fid}*.fits'.format(
plan=plan,
fid=fid))]
# try to grab to version with designid_status first
files_field = [file for file in glob.glob(replace_path +
'{plan}_{fid}*_designid_status.fits'.format(
plan=plan,
fid=fid))]
if len(files_field) == 0:
files_field = [file for file in glob.glob(replace_path +
'{plan}_{fid}*.fits'.format(
plan=plan,
fid=fid))]
files += files_field
for f in files:
if 'validation' in f:
files.remove(f)
Expand Down

0 comments on commit f20c5f7

Please sign in to comment.