032 — Physically grounded window selection (production)#
Production calibration-window selector. Same WindowSelector library
class as 031 but with stricter physically-grounded thresholds (SNR
floor, minimum cycle count per day, cross-chamber agreement
requirement).
Output is the canonical 032_calibration_windows.csv consumed by the
XPalm digital-twin calibration step (Julia notebook 040, out of scope
for palmwtc 0.1).
Runs against the bundled synthetic sample but produces 0 windows (synthetic cycles are too short for high-confidence selection).
from palmwtc.config import DataPaths
from palmwtc.pipeline import run_step
paths = DataPaths.resolve()
print(paths.describe())
DataPaths (source=sample (bundled synthetic), site=libz):
raw_dir = /home/runner/work/palmwtc/palmwtc/src/palmwtc/data/sample/synthetic
processed_dir = /home/runner/work/palmwtc/palmwtc/src/palmwtc/data/sample/Data/Integrated_QC_Data
exports_dir = /home/runner/work/palmwtc/palmwtc/src/palmwtc/data/sample/exports
config_dir = /home/runner/work/palmwtc/palmwtc/src/palmwtc/data/sample/config
extras = <none>
result = run_step("windows", paths)
print(f"Status: {'OK' if result.ok else 'FAILED'}")
print(f"Elapsed: {result.elapsed_seconds:.2f}s")
print(f"In: {result.rows_in:>4} cycles")
print(f"Out: {result.rows_out:>4} windows")
print(f"Artefacts:")
for a in result.artefacts:
print(f" - {a}")
Status: OK
Elapsed: 0.02s
In: 3 cycles
Out: 0 windows
Artefacts:
- /home/runner/work/palmwtc/palmwtc/src/palmwtc/data/sample/exports/digital_twin/031_scored_cycles.csv
- /home/runner/work/palmwtc/palmwtc/src/palmwtc/data/sample/exports/digital_twin/032_calibration_windows.csv
The two artefacts are the scored cycles (031-style output) and the identified windows (032 output). Real LIBZ data typically yields 50-200 high-confidence windows per month.