Keck-DataReductionPipelines / KPF-Pipeline

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

Method for applying QC tests to specific types of spectra #861

Closed awhoward closed 5 months ago

awhoward commented 5 months ago

In separate discussions with @aaronhouseholder and @stevengiacalone, it became clear that we need a general way to apply QC tests to specific types of files. For example, QC tests related to Dark exposures should only be performed on files with those characteristics.

Here's an implementation plan. It will use the HeaderParse.get_name() to determine the type of spectrum (that method returns 'Dark', 'Bias', 'Star', 'Flat', 'LFC', etc.). In modules/quality_control/src/quality_control.py I'll add a new attribute to QCDefinitions called spectrum_type (an array), which will match the spectral types returned from HeaderParse.get_name(). There may be other attributes that we want to filter on, but I can't think of any now.

I will also modify the logic in _perform() in modules/quality_control/src/quality_control.py so only observations with the correct spectrum_type are processed with certain QC tests.