quality_control.diagnostics.level1

Diagnostics for KPF Level 1 (assembled FFI) data products.

The L1 metrics consumed by QCL1 that depend on intermediate processing state (read noise from raw overscan, the BIASSUB flag) are still written by the modules that produce them — ImageAssembly, ImageProcessing. Metrics that can be recomputed from the finished L1 product alone live here: the master calibration ages, derived from the master paths CalibrationAssociation wrote to RECEIPT plus the observation timestamp (DATE-OBS) on PRIMARY.

class kpfpipe.quality_control.diagnostics.level1.DiagL1(kpf_obj)

Bases: Diagnostics

LEVEL = 'L1'
calibration_ages()

Signed fractional-day age (master - obs) for each associated master.

Recomputed from the finished L1 product: the master path is read from RECEIPT ({PREFIX}FILE, written by CalibrationAssociation) and the observation timestamp from PRIMARY (DATE-OBS). The master timestamp is parsed from its filename. A cal type is skipped when its path is absent; the whole metric is skipped when DATE-OBS is missing.

Returns:

Maps each present {PREFIX}AGE keyword to its (age, comment).

Return type:

dict