CLI Entry Points (Callables)¶
All CLI commands are registered as entry points in
pyproject.toml and become available as shell commands after the package is
installed. Each command wraps a single Python function; click on the function
name to see its full documentation.
Workflow Management¶
Command |
Python function |
Description |
|---|---|---|
|
Top-level CLI for installing software and executing commands inside the
data-production environment (supports |
|
|
Scan a directory of raw LH5 files and build a
|
Data Tier Building¶
Command |
Python function |
Description |
|---|---|---|
|
Build the DSP tier for all channels in a run file; supports multiprocessing. |
|
|
Build the DSP tier for a single detector channel. |
|
|
Build the HIT tier for all channels from DSP output. |
|
|
Build the HIT tier for a single detector channel. |
DSP Parameter Optimisation (par-geds-dsp-*)¶
These scripts are run during the calibration phase to determine optimal digital signal processing parameters for each HPGe detector channel. They are typically executed in the order shown below.
Command |
Python function |
Description |
|---|---|---|
|
Fit the pole-zero decay constant(s) from waveform tail slopes.
Supports single-exponential ( |
|
|
Optimise DSP filter shaping for noise rejection using low-energy baseline events. |
|
|
Select calibration peak events from raw data files for use by the energy optimiser and DPLMS filter builder. |
|
|
Bayesian optimisation of CUSP, ZAC, and trapezoidal filter shaping parameters for best energy resolution. |
|
|
Compute DPLMS optimal filter coefficients from FFT baseline and calibration peak data. |
|
|
Train a Support Vector Machine classifier on discrete wavelet transform features for pulse-shape discrimination. |
|
|
Register a pre-trained SVM model file path in the DSP parameter database. |
HIT Parameter Optimisation (par-geds-hit-*)¶
These scripts are run after the DSP tier is built to calibrate physics observables at the hit level.
Command |
Python function |
Description |
|---|---|---|
|
Derive data-driven quality-cut classifiers from calibration and FFT run data. |
|
|
HPGe energy calibration: peak finding, fitting, and FWHM curve extraction for multiple energy parameters. |
|
|
Calibrate the A/E (current amplitude over energy) pulse-shape discriminant with optional drift-time and energy-dependent corrections. |
|
|
Calibrate the LQ (late charge) pulse-shape discriminant with DEP-based cut determination. |
Typical Invocation¶
Commands are usually invoked by Snakemake rules, but can be called directly for debugging:
$ par-geds-dsp-pz \
--processing-chain dsp_config.yaml \
--config-file pz_config.yaml \
--raw-table-name ch1057600/raw \
--raw-files /data/raw/run001.lh5 \
--output-file /output/pz_pars.yaml
$ build-tier-dsp \
--configs /path/to/configs \
--datatype cal \
--timestamp 20230401T000000Z \
--tier dsp \
--input /data/raw/run001.lh5 \
--output /data/dsp/run001.lh5 \
--n-processes 4