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

from_ini(filepath)

Class method — load from an INI file

to_ini(filepath)

Save to an INI file

to_ini_string()

Return INI content as a string (e.g. for download buttons)

to_dict()

Return all parameters as a plain dict

validate()

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

isTimeAxisModified

(no suffix)

Sensor health

isSensorTest

_ST

Signal quality

isQCTest

_QCT

Profile operations

isProfileTest

_PT

Velocity check

isVelocityTest

_VT

Signal quality (isQCTest = True)

Attribute

Default

Description

ct_QCT

64.0

Correlation threshold (counts)

et_QCT

0.0

Echo intensity threshold (counts)

evt_QCT

2000.0

Error velocity threshold (mm/s)

ft_QCT

50.0

False target threshold (counts)

pgt_QCT

0.0

Percent good threshold (%)

is3beam_QCT

False

Enable three-beam mode

beam_ignore_QCT

None

Beam index to ignore in three-beam mode

Sensor health (isSensorTest = True)

Attribute

Default

Description

isRollCheck_ST

False

Enable roll check

roll_cutoff_ST

15.0

Roll threshold (degrees)

isPitchCheck_ST

False

Enable pitch check

pitch_cutoff_ST

15.0

Pitch threshold (degrees)

isSoundModified_ST

False

Enable sound speed correction

isTemperatureModified_ST

False

Replace temperature data

temperatureoption_ST

'None'

'None', 'Fixed Value', or 'File'

fixedtemperature_ST

15.0

Constant replacement value (°C)

temperature_file_ST

''

Path to CSV replacement file

Velocity check (isVelocityTest = True)

Attribute

Default

Description

isMagnetCheck_VT

False

Enable magnetic declination correction

magnet_user_input_VT

0.0

Declination in degrees (+ east)

isCutoffCheck_VT

False

Enable velocity threshold check

maxuvel_VT

2500.0

U threshold (mm/s)

maxvvel_VT

2500.0

V threshold (mm/s)

maxwvel_VT

500.0

W threshold (mm/s)

isDespikeCheck_VT

False

Enable despike filter

despike_kernel_VT

5

Despike window size

despike_cutoff_VT

3.0

Despike threshold (σ)

isFlatlineCheck_VT

False

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

  • coreProcessedDataset.apply_config() and export_config()

  • autoprocess — Run the full pipeline from a config file