feat(par-pht): migrate aoe/lq partition scripts to the multi-parameter params schema - #164
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the HPGe partition calibration console scripts in workflow/src/legenddataflow/scripts/par/geds/pht/ to consume the new multi-parameter params configuration schema for A/E and LQ, aligning this repository with the corresponding multi-parameter calibration work in legend-dataflow-scripts and pygama.
Changes:
- Migrate
par-geds-pht-aoeandpar-geds-pht-lqto build DSP column requirements from the new per-PSD-parameterparamsmapping. - Update the A/E and LQ portions of
par-geds-pht-fastto use the sameparamsmapping and include any per-parameterdt_param/dt_cutoutputs in the loaded column list. - Tighten top-level config key requirements for the new schema (
cal_energy_param,cut_field,params, etc.).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| workflow/src/legenddataflow/scripts/par/geds/pht/aoe.py | Switch A/E partition script to the multi-parameter params schema and build required columns from all configured parameters. |
| workflow/src/legenddataflow/scripts/par/geds/pht/lq.py | Switch LQ partition script to the multi-parameter params schema and build required columns from all configured parameters. |
| workflow/src/legenddataflow/scripts/par/geds/pht/fast.py | Update the combined fast partition script’s A/E + LQ sections to use the multi-parameter params schema when constructing the load-data column list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Note on CI: the unit-test job failures here are inherited from the base branch — |
164a9f0 to
829cb1e
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## fable-updates #164 +/- ##
=================================================
- Coverage 53.85% 53.41% -0.45%
=================================================
Files 34 34
Lines 2863 2887 +24
=================================================
Hits 1542 1542
- Misses 1321 1345 +24 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…chema par-geds-pht-aoe, par-geds-pht-lq and the aoe/lq sections of par-geds-pht-fast now read the multi-parameter config schema (top-level cal_energy_param/cut_field plus a params mapping with one entry per PSD parameter), building their DSP column lists from all entries. Matches the multi-parameter run_aoe_calibration/run_lq_calibration in legend-dataflow-scripts (legend-exp/legend-dataflow-scripts#47). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Missing current_param/lq_param/energy_param in a params entry now raises a clear error naming the channel and entry instead of a bare KeyError. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A dt_cut mapping missing out_param now raises a clear error naming the channel and params entry instead of a bare KeyError. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mirror the par-dsp dplms check in the psp variant: a peak may legitimately be absent from an individual run's file, so validate the dplms config's requested peaks against the union over all peak files with require_peaks_present before reading waveforms, instead of silently selecting zero events. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
829cb1e to
3691134
Compare
Summary
Migrates
par-geds-pht-aoe,par-geds-pht-lq, and the aoe/lq sections ofpar-geds-pht-fastto the multi-parameterparamsconfig schema (top-levelcal_energy_param/cut_fieldplus aparamsmapping with one entry per PSD parameter, each with its owncurrent_param/lq_param,energy_param, and optionaldt_param/dt_cut/suffix). The scripts build their DSP column lists from all entries and validate the new required keys up front.This is the legend-dataflow side of the multi-parameter A/E + LQ calibration:
run_lq_calibration+ the aoe port (stacked on perf: speed and memory optimisation of the par-geds dsp and hit scripts legend-dataflow-scripts#44)LQCal.calibratesuffix supportStacked on #161 (
fable-updates) — only the top commit is new. Note the production metadataaoecal/lqcalconfigs still use the flat schema and need restructuring toparamsform before these scripts run in production.Test plan
Skimmed-data pht integration chain (per-run ecal → partcal → aoe → lq → fast, two runs) passes locally with params-schema configs — the LQ config exercises an unsuffixed primary plus a suffixed duplicate entry; full local suite 127 passed. (The integration suite itself is part of the in-progress testing work and not yet committed.)
Per
AI_POLICY.md: developed with AI assistance (Claude); reviewed by the submitter.🤖 Generated with Claude Code