sensor_health
Provides SensorHealthRunner — the class that ProcessedDataset.apply_sensor_health()
delegates to. Use it directly when you need finer control over individual checks
or want to access per-step statistics.
SensorHealthRunner
import pyadps
from pyadps.processing.sensor_health import SensorHealthRunner
ds = pyadps.read('deployment.000')
runner = SensorHealthRunner(ds)
Methods
Method |
Description |
|---|---|
|
Replace a dataset variable with external data (e.g. CTD) |
|
Recalculate sound speed and optionally correct velocity |
|
Flag ensembles where roll exceeds threshold (degrees) |
|
Flag ensembles where pitch exceeds threshold (degrees) |
|
Restore working dataset to original state |
|
Return processed |
All methods return self for chaining.
Statistics Methods
Method |
Description |
|---|---|
|
Dict of |
|
Dict of |
|
Print formatted QC summary table |
|
Return summary as a string |
|
Return |
Usage
import numpy as np
runner = SensorHealthRunner(ds)
# Replace ADCP temperature with CTD data, then correct sound speed
ctd_temp = np.loadtxt('ctd_temperature.csv') # °C
ctd_sal = np.loadtxt('ctd_salinity.csv') # PSU
result = (runner
.replace_data(ctd_temp, 'temperature')
.replace_data(ctd_sal, 'salinity')
.correct_sound_speed()
.roll_check(threshold=15.0)
.pitch_check(threshold=15.0)
.finalize())
runner.print_statistics()
Note
replace_data() automatically applies the variable’s scale_factor to convert
physical units to RDI internal format (e.g. 15.0 °C → 1500 internally).