autoprocess
Provides autoprocess() — a single-function entry point that runs the complete
processing pipeline from a config file or ProcessingConfig object. This is the
function the web app’s Write File page calls internally.
Function
from pyadps.processing.autoprocess import autoprocess
result = autoprocess(config_file_or_object, **options)
Parameters
Parameter |
Default |
Description |
|---|---|---|
|
— |
Path to |
|
|
ADCP binary file path; overrides the path stored in config |
|
|
Save processed dataset to NetCDF |
|
|
Save only u/v/w velocity components instead of full dataset |
|
|
Output units: |
|
|
Output directory; defaults to same directory as input file |
|
|
Output filename; auto-generated if not specified |
|
|
Reorder depth dimension to be ascending in output |
|
|
Print processing summary to console |
Returns the processed xarray.Dataset.
Usage
from pyadps.processing.autoprocess import autoprocess
# Run from a saved config file
result = autoprocess('config.ini')
# Save full NetCDF output
result = autoprocess('config.ini', save_netcdf=True, output_dir='processed/')
# Save velocity-only output in SI units
result = autoprocess('config.ini', save_netcdf=True,
save_velocity_only=True, velocity_units='m/s')
Programmatic Use
Pass a ProcessingConfig object instead of a file path when building scripts
that don’t rely on a saved config.ini:
from pyadps.processing.autoprocess import autoprocess
from pyadps.processing.config import ProcessingConfig
config = ProcessingConfig()
config.isQCTest = True
config.correlation_threshold = 64
config.echo_intensity_threshold = 40
result = autoprocess(
config,
binary_file_path='data/deployment.000',
save_netcdf=True,
output_dir='results/',
print_summary=False,
)
Non-Obvious Behaviors
binary_file_path overrides the config. If you supply it, the file path
stored inside the config is ignored — useful for re-using one config across
multiple deployments.
Auto-generated filenames follow the pattern <input_stem>_processed.nc
(full dataset) or <input_stem>_velocity.nc (velocity-only).