dyco apply-batch¶
Remove lags listed in an existing tlag_results.csv. Detects nothing — it reads the numbers another
run produced and shifts columns by them. Step 2 of the two-step route, after
dyco pwb-batch.
Also available as the standalone dyco-apply-batch.
--scalar LABEL:column here reads the lag recorded under LABEL and applies it to column, so one
gas’s detected lag can be removed from another gas’s data.
All options¶
Apply PWB-detected time lags to raw EC files. Alias: uv run dyco-apply-batch
usage: dyco apply-batch [-h] --input-dir INPUT_DIR --output-dir OUTPUT_DIR
--results-csv RESULTS_CSV --scalar LABEL:column
[--lag-column-template LAG_COLUMN_TEMPLATE] [--hz HZ]
[--skiprows SKIPROWS] [--extra-rows EXTRA_ROWS]
[--sep SEP] [--lineterm LINETERM]
[--na-values NA_VALUES [NA_VALUES ...]]
[--na-rep NA_REP] [--period-col PERIOD_COL]
[--period-key-regex PERIOD_KEY_REGEX]
[--file-key-regex FILE_KEY_REGEX]
[--n-workers N_WORKERS] [--strict]
Named Arguments¶
- --input-dir
Directory containing the original EddyPro rotated .txt files.
- --output-dir
Output directory for lag-corrected files.
- --results-csv
tlag_results.csv produced by dyco-pwb-batch.
- --scalar
Gas label and column name, e.g. CH4:ch4. Repeat for each gas.
- --lag-column-template
Lag-column template (use {prefix} for lowercased scalar label).
Default:
'{prefix}_tlag_final_pf_s'- --hz
Sampling frequency in Hz.
Default:
20- --skiprows
Lines BEFORE the column-name row (EddyPro rotated: 9; raw CSV with header on line 1: 0).
Default:
9- --extra-rows
Extra rows AFTER the header but BEFORE data (e.g. units + instrument-source rows: 2). Each preserved verbatim in the output.
Default:
0- --sep
Field separator. Default: whitespace (regex ‘s+’). Use ‘,’ for CSV, ‘t’ for TSV.
Default:
'\s+'- --lineterm
Line terminator written between data rows. Default ‘n’; use ‘rn’ to match Windows-CRLF input.
Default:
' '- --na-values
Strings to treat as NaN on read.
Default:
['-9999', '-9999.0', '-9999.0000000000000']- --na-rep
Value written for NaN on output.
Default:
'-9999'- --period-col
Name of the filename column in the results CSV.
Default:
'period'- --period-key-regex
Regex applied to each period value; concatenated capture groups form the key. Pair with –file-key-regex to bridge name mismatches.
- --file-key-regex
Regex applied to each filename in –input-dir; concatenated capture groups form the key.
- --n-workers
Parallel worker processes (default: os.cpu_count()).
- --strict
Re-raise worker exceptions instead of capturing them.
Default:
False