calibrate_all: accept a read_ldata NamedTuple datastore#47
Open
jonasschlegel wants to merge 1 commit into
Open
calibrate_all: accept a read_ldata NamedTuple datastore#47jonasschlegel wants to merge 1 commit into
jonasschlegel wants to merge 1 commit into
Conversation
Adds a thin _NTDataStore adapter so calibrate_all can be called directly
with the NamedTuple returned by read_ldata. The eager Dict{String,Any}
conversion is necessary to avoid massive LLVM compile-time blow-up from
specializing on the NamedTuple's huge typed signature (~120 fields).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #47 +/- ##
========================================
- Coverage 5.77% 5.68% -0.09%
========================================
Files 7 7
Lines 329 334 +5
========================================
Hits 19 19
- Misses 310 315 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What didn't work before
calibrate_allonly accepted anAbstractDataStore(an open LH5 file). The phyevent builder now reads its DSP input with
read_ldata(l200, :jldsp, fk), whichreturns a
NamedTuple(one entry per detector) — and there was no method for that,so
calibrate_all(l200, fk, dsp_data)failed to dispatch.Why the change is necessary
Juleana's
process_evt_phy.jlreads jldsp viaread_ldataand feeds the resultstraight into
calibrate_all. To keep that single-call workflow,calibrate_allhasto accept the
NamedTuplethatread_ldatareturns.What works now
calibrate_all(data, sel, datastore::NamedTuple, tier=:jldsp)is supported; thecore
calibrate_allbody is unchanged (existingAbstractDataStorecallers keepworking).
_NTDataStoreadapter wraps the NamedTuple as aDict{String,Any}keyed bydetector and forwards
getindex/haskey. The eagerDictconversion isdeliberate: passing the ~120-field NamedTuple straight to
calibrate_allwouldspecialize it on that giant type and blow up LLVM compile time.
Dependencies
Consumes
read_ldata(LegendDataManagement). Pairs with Juleanaread-ldata-input,which produces the
NamedTuple(read_ldata(l200, :jldsp, fk)→calibrate_all). Independent of the other LEA PR (sipm-per-fiber-pe-sums).