Skip to content

Commit c1ced62

Browse files
committed
fix typo from PR 2441
1 parent 1ea02b0 commit c1ced62

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

py/desispec/scripts/proc_night.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -557,16 +557,19 @@ def create_submit_add_and_save(prow, proctable, check_outputs=check_for_outputs,
557557
tnight = tile_prows[tile_prows['JOBDESC']=='tilenight'][0]
558558
elif 'poststdstar' in tile_prows['JOBDESC']:
559559
poststdstars = tile_prows[tile_prows['JOBDESC']=='poststdstar']
560-
tnight = tile_prows[tile_prows['JOBDESC']=='poststdstar'][-1]
560+
tnight = poststdstars[-1]
561561
## Try to gather all the expids, but if that fails just move on
562562
## with the EXPID's from the last entry. This only happens in daily
563563
## for old proctabs and doesn't matter for cumulative redshifts
564-
if len(tnight) > 1:
564+
if len(poststdstars) > 1:
565565
try:
566+
## If more than one poststdstar, combine all EXPIDs for fake tilenight job
566567
tnight['EXPID'] = np.sort(np.concatenate(poststdstars['EXPID']))
567568
except:
569+
## Log a warning but don't do anything since this only
570+
## impacts documentation and not data reduction
568571
log.warning(f"Tried and failed to populate full EXPIDs for: {dict(tnight)}")
569-
pass
572+
570573
## if spectra processed, check for redshifts and remove any found
571574
if tnight is not None:
572575
for cur_ztype in cur_z_submit_types.copy():

0 commit comments

Comments
 (0)