desihub / desispec

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

Flux calibration failure for a single camera of expid 262661 #2414

Open akremin opened 1 week ago

akremin commented 1 week ago

It's been quite some time since I've seen a failure in flux calibration when standard star fitting succeeded. This claims the ivar is completely nulled.

Night=20241113, expid=262661, tileid=83502 Log: https://data.desi.lbl.gov/desi/spectro/redux/daily/run/scripts/night/20241113/tilenight-20241113-83502-33092110.log

Investigate whether there is an issue in generating the standard star outputs or in the flux calibration, or whether it is simply bad data that needs to be thrown out.

/global/common/software/desi/perlmutter/desiconda/20240425-2.2.0/conda/lib/python3.10/site-packages/numpy/core/fromnumeric.py:3474: RuntimeWarning: Mean of empty slice.
  return _methods._mean(a, axis=axis, dtype=dtype,
/global/common/software/desi/perlmutter/desiconda/20240425-2.2.0/conda/lib/python3.10/site-packages/numpy/core/_methods.py:189: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
INFO:fluxcalibration.py:1115:compute_flux_calibration: z5 mean scale =  nan
ERROR:fluxcalibration.py:1155:compute_flux_calibration: z5 null ivar, cannot calibrate this frame
CRITICAL:util.py:155:runcmd: FAILED rank 0 exception while running desispec.scripts.fluxcalibration.main(['--infile', '/dvs_ro/cfs/cdirs/desi/spectro/redux/daily/exposures/20241113/00262661/frame-z5-00262661.fits.gz', '--sky', '/dvs_ro/cfs/cdirs/desi/spectro/redux/daily/exposures/20241113/00262661/sky-z5-00262661.fits.gz', '--fiberflat', '/dvs_ro/cfs/cdirs/desi/spectro/redux/daily/exposures/20241113/00262661/fiberflatexp-z5-00262661.fits.gz', '--models', '/dvs_ro/cfs/cdirs/desi/spectro/redux/daily/exposures/20241113/00262661/stdstars-5-00262661.fits.gz', '--outfile', '/global/cfs/cdirs/desi/spectro/redux/daily/exposures/20241113/00262661/fluxcalib-z5-00262661.fits.gz', '--selected-calibration-stars', '/global/cfs/cdirs/desi/spectro/redux/daily/exposures/20241113/00262661/calibstars-00262661.csv']) called from line 1406 in /global/common/software/desi/perlmutter/desiconda/20240425-2.2.0/code/desispec/main/py/desispec/scripts/proc.py
ERROR:util.py:163:runcmd: Traceback (most recent call last):
ERROR:util.py:163:runcmd: File "/global/common/software/desi/perlmutter/desiconda/20240425-2.2.0/code/desispec/main/py/desispec/util.py", line 146, in runcmd
    result = cmd(*args)
ERROR:util.py:163:runcmd: File "/global/common/software/desi/perlmutter/desiconda/20240425-2.2.0/code/desispec/main/py/desispec/scripts/fluxcalibration.py", line 251, in main
    fluxcalib = compute_flux_calibration(frame, model_wave, model_flux,
ERROR:util.py:163:runcmd: File "/global/common/software/desi/perlmutter/desiconda/20240425-2.2.0/code/desispec/main/py/desispec/fluxcalibration.py", line 1156, in compute_flux_calibration
    raise ValueError(msg)
ERROR:util.py:163:runcmd: ValueError: z5 null ivar, cannot calibrate this frame
CRITICAL:util.py:172:runcmd: FAILED desispec.scripts.fluxcalibration.main(['--infile', '/dvs_ro/cfs/cdirs/desi/spectro/redux/daily/exposures/20241113/00262661/frame-z5-00262661.fits.gz', '--sky', '/dvs_ro/cfs/cdirs/desi/spectro/redux/daily/exposures/20241113/00262661/sky-z5-00262661.fits.gz', '--fiberflat', '/dvs_ro/cfs/cdirs/desi/spectro/redux/daily/exposures/20241113/00262661/fiberflatexp-z5-00262661.fits.gz', '--models', '/dvs_ro/cfs/cdirs/desi/spectro/redux/daily/exposures/20241113/00262661/stdstars-5-00262661.fits.gz', '--outfile', '/global/cfs/cdirs/desi/spectro/redux/daily/exposures/20241113/00262661/fluxcalib-z5-00262661.fits.gz', '--selected-calibration-stars', '/global/cfs/cdirs/desi/spectro/redux/daily/exposures/20241113/00262661/calibstars-00262661.csv'])