Skip to content

Add PIMM input support for full-chain training and truth conversion - #192

Open
francois-drielsma wants to merge 5 commits into
mainfrom
feature/pimm-load
Open

francois-drielsma wants to merge 5 commits into
mainfrom
feature/pimm-load

Conversation

@francois-drielsma

Copy link
Copy Markdown
Member

Add provider: pimm for paired JAXTPC hit and label files. pimm-data handles decoding, event alignment and truth associations; SPINE converts the resulting events into aligned tensors, cluster labels, particle truth, endpoint targets, genealogy and spatial metadata.

Pixel hits are transformed to physical coordinates and voxelized with summed charge. All spatial products share the same grid and label selection. Voxels with no labelled contribution are excluded by default. The optional spine[pimm] extra, Docker image and coverage CI use the pinned upstream revision.

Validation:

  • 26 adapter tests with 100% line and branch coverage, including installation through spine[pimm].
  • Real-sample forward/backward checks with nonzero supervision and gradients for segmentation, PPN, Graph-SPICE and shower/track/interaction GrapPA.
  • Segmentation/graph cache checks and truth-object HDF5 round trips in centimetres.
  • Lint, type checking and strict documentation checks.

The 3D parsers currently support pixel input. Missing endpoints and unavailable deposited energy remain NaN; charge is not converted to MeV. Nominal drift timing can displace hits relative to truth endpoints.

An upstream pimm-data release is required before official adoption; the current commit pin is provisional.

@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (762caac) to head (af8e07a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              main      #192    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          444       452     +8     
  Lines        39742     40048   +306     
==========================================
+ Hits         39742     40048   +306     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/spine/io/dataset/__init__.py 100.00% <100.00%> (ø)
src/spine/io/dataset/hdf5.py 100.00% <100.00%> (ø)
src/spine/io/dataset/pimm.py 100.00% <100.00%> (ø)
src/spine/io/parse/pimm/__init__.py 100.00% <100.00%> (ø)
src/spine/io/parse/pimm/base.py 100.00% <100.00%> (ø)
src/spine/io/parse/pimm/cluster.py 100.00% <100.00%> (ø)
src/spine/io/parse/pimm/metadata.py 100.00% <100.00%> (ø)
src/spine/io/parse/pimm/particle.py 100.00% <100.00%> (ø)
src/spine/io/parse/pimm/tensor.py 100.00% <100.00%> (ø)
src/spine/io/read/__init__.py 100.00% <100.00%> (ø)
... and 4 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant