Here are some quality control (QC) tests and diagnostic numbers that we should consider putting into the headers using the new QualityControl and Diagnostics frameworks:
2D
QC: Green 2D data are present when the camera is triggered. 2D array sizes are as expected. Ditto for Red.
QC: same as above for Ca H&K.
QC: for bias and dark frames, check that the flux is low
L1:
QC: Green L1 data are present when the camera is triggered. L1 array sizes are as expected. Ditto for Red.
QC: same as above for Ca H&K
QC: L1 spectra have positive values. This will catch the problem of negative flux that is most apparent in SKY. We'll have to think a little about what 'negative flux' means here because the extracted L1 spectra from a bias image should have half of the pixels with flux < 0. Maybe the metric should be in "chi-squared-like" units (flux / sqrt(variance)).
Diagnostics: fraction of pixels in SKY/SCI1/SCI2/SCI3/CAL that have negative flux values.
QC: check the WLS for SKY/SCI1/SCI2/SCI3/CAL to see if they are wildly different from some reference WLS
Diagnostics: provide a metric of the difference between the WLS for SKY/SCI1/SCI2/SCI3/CAL and a reference WLS
QC: for wavelength calibrations, check that the flux in each order is above some minimum. How to test will need to be thought through for the different cal sources.
QC: for LFC frames, develop a check for the spectral smoothness of individual spectra. Some are relatively smooth, while others have huge variations in amplitude over a short wavelength region. We should be sensitive to this.
Diagnostics: provide a quantitative metric for the above issue with LFC spectra.
Diagnostics: for LFC spectra, determine the minimum usable wavelength (perhaps with an SNR test).
L2:
QC: check that all expected data products are present
QC: some metric that senses spectral orders that are wild outliers, perhaps compared to other spectral orders
QC: check that the BCvels (per order) are "reasonable", between the exposure start and end and perhaps other checks.
Here are some quality control (QC) tests and diagnostic numbers that we should consider putting into the headers using the new QualityControl and Diagnostics frameworks:
2D
L1:
L2:
@howardisaacson, @shalverson -- please add suggestions here. I looked at Issue https://github.com/Keck-DataReductionPipelines/KPF-Pipeline/issues/559 for ideas.