dyco pwb-batch¶
Detect lags only, across files that are already split into averaging periods. Writes
tlag_results.csv and stops — nothing is shifted and no corrected raw data is produced. Pair it with
dyco apply-batch.
Also available as the standalone dyco-pwb-batch.
Important
Input files must already be wind-rotation corrected (double rotation or planar fit, e.g. EddyPro
“Advanced” rotated output). This command does not rotate; a non-zero mean W corrupts the
cross-correlation. dyco detect-remove handles rotation itself, and is the right
choice unless your files are already split.
All options¶
Parallel PWB time-lag detection across EddyPro high-frequency files. Alias: uv run dyco-pwb-batch
usage: dyco pwb-batch [-h] --input-dir INPUT_DIR [--file-pattern FILE_PATTERN]
--output-dir OUTPUT_DIR --scalar LABEL:column
[--col-w COL_W] --col-tsonic COL_TSONIC
[--usecols USECOLS [USECOLS ...]]
[--col-names COL_NAMES [COL_NAMES ...]]
[--skiprows SKIPROWS]
[--na-values NA_VALUES [NA_VALUES ...]] [--hz HZ]
[--lag-max LAG_MAX] [--n-bootstrap N_BOOTSTRAP]
[--block-length BLOCK_LENGTH]
[--min-valid-frac MIN_VALID_FRAC]
[--hdi-thresh HDI_THRESH] [--dev-thresh DEV_THRESH]
[--hdi-prefilter HDI_PREFILTER] [--n-workers N_WORKERS]
[--save-plots] [--random-state RANDOM_STATE]
[--file-date-format FILE_DATE_FORMAT]
Named Arguments¶
- --input-dir
Directory containing EddyPro rotated .txt files.
- --file-pattern
Glob pattern for input files.
Default:
'*.txt'- --output-dir
Directory for results CSV, checkpoint, and optional plots.
- --scalar
Gas label and column name, e.g. CH4:ch4. Repeat for each gas.
- --col-w
Column name for vertical wind W.
Default:
'w'- --col-tsonic
Column name for sonic temperature T_SONIC (required; enables 4-combination RFlux v3.2.0 mode).
- --usecols
0-based column indices to read from each file.
Default:
[0, 1, 2, 3, 4, 5]- --col-names
Column names to assign after selecting –usecols.
Default:
['u', 'v', 'w', 'ts', 'ch4', 'n2o']- --skiprows
Metadata rows before the column-name row.
Default:
9- --na-values
Strings to treat as NaN.
Default:
['-9999', '-9999.0', '-9999.0000000000000']- --hz
Sampling frequency in Hz.
Default:
20- --lag-max
CCF search half-width in seconds.
Default:
10.0- --n-bootstrap
Number of block-bootstrap replicates.
Default:
99- --block-length
Bootstrap block length in seconds.
Default:
20.0- --min-valid-frac
Minimum non-NaN fraction for a series to be processed.
Default:
0.3- --hdi-thresh
S1 HDI threshold in seconds.
Default:
0.5- --dev-thresh
S2 deviation threshold in seconds.
Default:
0.5- --hdi-prefilter
HDI pre-filter threshold in seconds (0 = disabled).
Default:
1.0- --n-workers
Parallel worker processes (default: os.cpu_count()).
- --save-plots
Save one diagnostic PNG per period per scalar.
Default:
False- --random-state
Base seed for reproducible bootstrap results.
- --file-date-format
strptime pattern for the leading datetime in each filename, e.g. ‘%Y%m%d-%H%M’ for ‘20210820-0930_rotated.txt’. Adds a ‘timestamp’ column and uses dates as the summary-plot x-axis.