desihub / desispec

DESI spectral pipeline
BSD 3-Clause "New" or "Revised" License
35 stars 24 forks source link

tilenight doesn't process the correct cameras when exposures differ in both LASTSTEP and BADCAMWORD #2166

Open akremin opened 7 months ago

akremin commented 7 months ago

Recently we were running the following tile:

Exp 1: LASTSTEP=all; BADCAMWORD='a3' Exp 2: LASTSTEP=all; BADCAMWORD='a3' Exp 3: LASTSTEP=skysub; BADCAMWORD=''

In this circumstance, it should not process standard stars or flux calibrate petal 3, but the code attempted to and crashed.

I believe it's an issue in the logic starting here: https://github.com/desihub/desispec/blob/f1a617b889faa9a29288ad59761d7ad56698d05f/py/desispec/scripts/proc_tilenight.py#L98

In the current situation a3 turned out to also be bad for the third exposure, so we were able to mark that bad and then things worked. But in the future this could be a blocking factor.