config
Provides ProcessingConfig — a dataclass that holds all processing parameters.
It acts as the bridge between the web app’s config.ini files and the
ProcessedDataset pipeline. It is a pure data container; no processing logic
lives here.
ProcessingConfig
from pyadps.processing.config import ProcessingConfig
# Create with defaults and set attributes directly
config = ProcessingConfig()
config.isQCTest = True
config.ct_QCT = 64.0
# Load from a saved config.ini (generated by the web app or export_config())
config = ProcessingConfig.from_ini('config.ini')
Methods
Method |
Description |
|---|---|
|
Class method — load from an INI file |
|
Save to an INI file |
|
Return INI content as a string (e.g. for download buttons) |
|
Return all parameters as a plain dict |
|
Return a list of validation warnings (empty list = OK) |
Key Attributes
Each processing stage has a gate flag (is*) that must be True for that stage
to run. Individual checks within the stage have their own enable flags.
Stage |
Gate flag |
Suffix convention |
|---|---|---|
Time axis |
|
(no suffix) |
Sensor health |
|
|
Signal quality |
|
|
Profile operations |
|
|
Velocity check |
|
|
Signal quality (isQCTest = True)
Attribute |
Default |
Description |
|---|---|---|
|
64.0 |
Correlation threshold (counts) |
|
0.0 |
Echo intensity threshold (counts) |
|
2000.0 |
Error velocity threshold (mm/s) |
|
50.0 |
False target threshold (counts) |
|
0.0 |
Percent good threshold (%) |
|
|
Enable three-beam mode |
|
|
Beam index to ignore in three-beam mode |
Sensor health (isSensorTest = True)
Attribute |
Default |
Description |
|---|---|---|
|
|
Enable roll check |
|
15.0 |
Roll threshold (degrees) |
|
|
Enable pitch check |
|
15.0 |
Pitch threshold (degrees) |
|
|
Enable sound speed correction |
|
|
Replace temperature data |
|
|
|
|
15.0 |
Constant replacement value (°C) |
|
|
Path to CSV replacement file |
Velocity check (isVelocityTest = True)
Attribute |
Default |
Description |
|---|---|---|
|
|
Enable magnetic declination correction |
|
0.0 |
Declination in degrees (+ east) |
|
|
Enable velocity threshold check |
|
2500.0 |
U threshold (mm/s) |
|
2500.0 |
V threshold (mm/s) |
|
500.0 |
W threshold (mm/s) |
|
|
Enable despike filter |
|
5 |
Despike window size |
|
3.0 |
Despike threshold (σ) |
|
|
Enable flatline detection |
INI File Format
The INI file is generated by ProcessedDataset.export_config() or the web
app’s Write File page. Section names match the stage suffixes:
[FileSettings]
input_file_name = deployment.000
input_file_path = /data/
[FixTime]
is_time_modified = true
is_snap_time_axis = true
time_snap_frequency = h
time_snap_tolerance = 5min
[SensorTest]
sensor_test = true
roll_check = true
roll_cutoff = 15.0
[QCTest]
qc_test = true
correlation = 64.0
echo_intensity = 0.0
error_velocity = 2000.0
[ProfileTest]
profile_test = true
trim_ends = true
trim_start = 100
trim_end = 50
cut_sidelobe = true
[VelocityTest]
velocity_test = true
velocity_cutoff = true
max_zonal_velocity = 2500.0
max_meridional_velocity = 2500.0
max_vertical_velocity = 500.0
Usage with ProcessedDataset
import pyadps
from pyadps.processing import ProcessedDataset
ds = pyadps.read('deployment.000')
proc = ProcessedDataset(ds)
proc.apply_config('config.ini').finalize()
# Or build programmatically
config = ProcessingConfig(isQCTest=True, ct_QCT=64.0, evt_QCT=2000.0)
proc.apply_config(config).finalize()
See Also
core —
ProcessedDataset.apply_config()andexport_config()autoprocess — Run the full pipeline from a config file