src.toolbox.steps.custom.interpolate_data#
Class definition for deriving CTD variables.
Classes#
A processing step for interpolating data. |
Module Contents#
- class src.toolbox.steps.custom.interpolate_data.InterpolateVariables[source]#
Bases:
toolbox.steps.base_step.BaseStep,toolbox.utils.qc_handling.QCHandlingMixinA processing step for interpolating data.
This class processes data to interpolate missing values and fill gaps in variables using time-based interpolation. It supports quality control handling and optional diagnostic visualization.
Inherits from BaseStep and processes data stored in the context dictionary.
- Parameters:
Examples
Example config usage:
- name: "Interpolate Data" parameters: qc_handling_settings: { flag_filter_settings: { "PRES": [3, 4, 9], "LATITUDE": [3, 4, 9], "LONGITUDE": [3, 4, 9] }, reconstruction_behaviour: "replace", flag_mapping: { 3: 8, 4: 8, 9: 8 } } diagnostics: false
- run()[source]#
Execute the interpolation workflow.
This method performs the following steps:
Filters data based on quality control flags
Converts xarray data to a Polars DataFrame
Interpolates missing values using time as the reference dimension
QC and data reconstruction based on user specification
Updates QC flags for interpolated values
Generates diagnostic plots if enabled
- Returns:
The updated context dictionary containing the interpolated dataset under the “data” key.
- Return type:
- generate_diagnostics()[source]#
Generate diagnostic plots comparing original and interpolated data.
Creates a side-by-side comparison visualization showing the first variable in filter_settings before and after interpolation.
This method uses the Tkinter backend for interactive display.
- Return type:
None