Keck-DataReductionPipelines / KPF-Pipeline

KPF-Pipeline
https://kpf-pipeline.readthedocs.io/en/latest/
Other
10 stars 2 forks source link

QC Tests and Diagnostics for LFC 2D files #859

Open awhoward opened 2 months ago

awhoward commented 2 months ago

As discussed in the DRP meeting, @aaronhouseholder should make one or more Quality Control (QC) and Diagnostics tests for the LFC 2D files. The idea is to identify LFC spectra that have enough flux to be useful for masters stacking and use in the wavelength solution code.

Read the Docs has instructions for developing QC metrics here and Diagnostics here.

For the QC metric, you might use a keyword like LFC2DFOK and an informative FITS keyword comment. For the Diagnostic, you might use a keyword like LFC2DF also with an informative FIT keyword comment.

You will want to add those keywords only for LFC spectra. For Diagnostics, an example of how to do this is in modules/quicklook/src/diagnostics_framework.py near lines 70-83. In that example, the code determines if a file is a "Dark" or not using HeaderParse.get_name(), which has the logic to determine whether a file is a dark or not. A similar call will return 'LFC' for the spectra that you're interested in.

I'm not sure of the general way to implement the "if LFC" logic in the QC framework. Let me think about it. In the meantime, you could apply your QC test to all 2D files (this happens by default).

Let me know if you want to chat about this or if you need pointers on setting up Jupyter on shrek forwarded to your laptop.

awhoward commented 2 months ago

@aaronhouseholder -- there's more on Issue https://github.com/Keck-DataReductionPipelines/KPF-Pipeline/issues/861 and PR https://github.com/Keck-DataReductionPipelines/KPF-Pipeline/pull/862