Skip to content

Commit

Permalink
dont crash submit_night if no laststep all exposure for a tile
Browse files Browse the repository at this point in the history
  • Loading branch information
akremin committed Mar 10, 2023
1 parent c20f0b6 commit 586ce63
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions py/desispec/scripts/submit_night.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,8 @@ def submit_night(night, proc_obstypes=None, z_submit_types=None, queue='realtime
tiles_this_night = tiles_this_night[tiles_this_night>0] # science tiles, not calibs
allexp = read_minimal_exptables_columns(tileids=tiles_this_night)
for tileid in tiles_this_night:
ii = (allexp['TILEID'] == tileid)
lastnight = np.max(allexp['NIGHT'][ii])
if lastnight == night:
nights_with_tile = allexp['NIGHT'][allexp['TILEID'] == tileid]
if len(nights_with_tile) > 0 and night == np.max(nights_with_tile):
tiles_cumulative.append(tileid)

log.info(f'Submitting cumulative redshifts for {len(tiles_cumulative)}/{len(tiles_this_night)} tiles '
Expand Down

0 comments on commit 586ce63

Please sign in to comment.