aiqclib.nrtqc.step2_run_qc package
Submodules
aiqclib.nrtqc.step2_run_qc.dataset_all module
This module defines the QCDataSetAll class, the concrete implementation of the NRT QC module’s step 2 (running the configured QC items) for Copernicus CTD data.
- class aiqclib.nrtqc.step2_run_qc.dataset_all.QCDataSetAll(config, input_data=None)[source]
Bases:
QCDataSetBaseA specialized implementation of
aiqclib.nrtqc.step2_run_qc.qc_base.QCDataSetBasethat applies the configured QC items to all observations.- Variables:
expected_class_name (str) – The class identifier used for configuration matching.
- Parameters:
config (ConfigBase)
input_data (DataFrame | None)
- expected_class_name: str = 'QCDataSetAll'
aiqclib.nrtqc.step2_run_qc.qc_base module
This module provides the QCDataSetBase class, the core of the NRT QC module’s step 2: applying the configured QC items to the input data.
Each enabled QC item is resolved through the feature registry (the items
are ordinary feature classes under prepare/features, registered with
qc_-prefixed names), instantiated with its configured parameters, and
run over the full input frame. The produced flag columns are joined back
onto the data, yielding one column per item/variable combination.
- aiqclib.nrtqc.step2_run_qc.qc_base.DEFERRED_QC_ITEMS: tuple = ('temp_to_psal',)
QC items that need the aggregated per-variable flags and therefore run during the flag aggregation step (step 3) instead of step 2.
- class aiqclib.nrtqc.step2_run_qc.qc_base.QCDataSetBase(config, input_data=None)[source]
Bases:
DataSetBaseBase class for running the configured NRT QC items (step
"qc").Takes the validated input data from step 1 and applies every item enabled in the configuration’s
qc_item_set— except the deferred propagation items, which need the aggregated flags of step 3. The result, stored inqc_data, is the input frame plus one flag column per item/variable combination.- Parameters:
config (ConfigBase)
input_data (DataFrame | None)
- default_file_name: str
The default name for the intermediate flag file.
- input_data: DataFrame | None
- output_file_name: str
The resolved output path for the intermediate flag file.
- qc_data: DataFrame | None
The input data with all QC item flag columns appended.
- qc_item_columns()[source]
Return the flag columns added by
run_qc_items().- Returns:
The columns of
qc_dataabsent from the input.- Return type:
List[str]- Raises:
ValueError – If
run_qc_items()has not been run yet.
- run_qc_items()[source]
Apply every enabled QC item and append its flag columns.
Items are applied in configuration order. Each item receives the raw input frame (items are independent of each other’s flags), and its flag columns are joined onto the accumulating result by the observation keys. Deferred items (
DEFERRED_QC_ITEMS) are skipped here and handled by step 3.- Raises:
ValueError – If an enabled item has no registered feature class (
qc_{name}missing from the registry).- Return type:
None