desihub / desispec

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

evaluate b5 readnoise impact #1559

Closed sbailey closed 2 years ago

sbailey commented 2 years ago

Evaluate the impact of b5 amp B readnoise in May 2021 data to decide what should be done for Fuji.

PSF

In the f4 production, b5 PSFs failed for every exposure on nights 20210507, 20210508, and 20210509, and 4/5 exposures on 20210510. Although PR #1543 updated the OSTEP calculation so that the entire CCD isn't masked, b5 amp B is running just under the 10 e- masking threshold such that many rows get flagged as BADREADNOISE and so much data is masked that PSFs fail.

Is it really so bad that we need to flag these exposures as bad? If so, are the default PSFs in desi_spectro_calib good enough or do we need a different fall back? Or do we need an update to PSF fitting, e.g. to ignore the BADREADNOISE mask bit?

Flats

Test production /global/cfs/cdirs/desi/users/sjbailey/spectro/redux/b5readnoise night 20210509 exposure 87782 is an example flat. Many rows of b5B are flagged as bad, but this wasn't fatal for the flats. Evaulate whether they are actually ok.

Science

Also in the sjbailey b5readnoise test prod, night 20210509 exposure 87817 is a science exposure. The fibers/wavelengths covering b5B are clearly readnoise dominated instead of sky/object shotnoise dominated, leading to a different ivar structure (stripes by CCD row instead of stripes in wavelength), but it isn't obviously catastrophically wrong (vs. just noisier).

In general

The readnoise is really bad on those nights, ~10 e-, but the pipeline basically models and propagates that and it should be reflected in ivar, TSNR2, redshifts, etc. Currently >10 e- triggers the CCD pixel-level BADREADNOISE mask. This is not one of the bits in desispec.maskbits.extractmaskval so it doesn't force ivar=0 for the extractions, but it looks like that might be happening for PSFs. I think the extraction behavior is correct: treat BADREADNOISE as informative, but still use the pixels with whatever ivar they have.

@julienguy can you evaluate this, especially for the failing PSFs?

julienguy commented 2 years ago
julienguy commented 2 years ago

A proposal is

sbailey commented 2 years ago

badamp issues are flagged better via PR #1605 and #1610 . Closing