desihub / desispec

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

qproc not finding appropriate cals for b cameras (20240501/0506/0509) #2243

Closed sybenzvi closed 1 month ago

sybenzvi commented 1 month ago

In spec_tests performed since the end of April, qproc is failing to find suitable calibrations for any of the b cameras. See, for example, the qproc logs from Nightwatch processing on 20240509.

I can reproduce the error by manually running qproc:

$> desi_qproc -i /global/cfs/cdirs/desi/spectro/data/20240509/00235887/desi-00235887.fits.fz --fibermap /global/cfs/cdirs/desi/users/sybenzvi/nightwatch/20240509/00235887/fibermap-00235887.fits --auto --auto-output-dir /global/cfs/cdirs/desi/users/sybenzvi/nightwatch/20240509/00235887 --cam b0 --fallback-on-dark-not-found

INFO:raw.py:150:read_raw: Will add header keywords from HDUs [1].
INFO:raw.py:160:read_raw: iotime 0.312 sec to read desi-00235887.fits.fz at 2024-05-10T07:51:11.768482
ERROR:calibfinder.py:354:__init__: Didn't find matching calibration data in /global/cfs/cdirs/desi/spectro/desi_spectro_calib/trunk/spec/sm4/sm4-b.yaml
Traceback (most recent call last):
...
KeyError: "Didn't find matching calibration data in /global/cfs/cdirs/desi/spectro/desi_spectro_calib/trunk/spec/sm4/sm4-b.yaml"

Oddly, data from the r and z cameras process fine. The logs indicate an appropriate older cal file is found:

$> desi_qproc -i /global/cfs/cdirs/desi/spectro/data/20240509/00235887/desi-00235887.fits.fz --fibermap /global/cfs/cdirs/desi/users/sybenzvi/nightwatch/20240509/00235887/fibermap-00235887.fits --auto --auto-output-dir /global/cfs/cdirs/desi/users/sybenzvi/nightwatch/20240509/00235887 --cam r0 --fallback-on-dark-not-found

INFO:raw.py:150:read_raw: Will add header keywords from HDUs [1].
INFO:raw.py:160:read_raw: iotime 0.301 sec to read desi-00235887.fits.fz at 2024-05-10T07:50:31.247345
WARNING:preproc.py:603:get_calibration_image: 20240509 nightly bias not found; using default bias for 235887 r0
INFO:preproc.py:625:get_calibration_image: Using BIAS /global/cfs/cdirs/desi/spectro/desi_spectro_dark/v2209/bias_frames/bias-sm4-r0-20240227.fits.gz
...
sybenzvi commented 1 month ago

Fixed by Julien with updates to the b camera YAML files in DESI_SPECTRO_CALIB.