desihub / desispec

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

Combine PSFs even if individual bundles failed #2244

Open sbailey opened 4 months ago

sbailey commented 4 months ago

Currently in the pipeline

However, if desi_fit_psf fails for an individual bundle by having a bogus solution with overlapping fiber traces, this causes desi_compute_psf to fail and halt the entire pipeline.

It would be better if the bad bundle would be flagged as bad in the per-exposure PSF fit to prevent it from being used in mean_psf, but otherwise let the pipeline proceed. It is relatively common for small updates to darks/masks to trigger new edge case failures leading to time consuming flagging, cleanup, and resubmissions in new prods. Our current mitigation is to flag the entire camera as bad for that exposure and rerun, which looses the otherwise good bundles on that camera from the mean (ok, but not great).

Example failures of individual bundles in jura which had not been caught and flagged by earlier prods:

All of these would have been fine if it just logged an error, flagged the per-exposure bundle as bad, but then proceeded and dropped the bundle/exp from the psfnight merging.