Skip to content

FIX: solve HMC-off identity transform collisions across PET series#331

Merged
mnoergaard merged 3 commits into
mainfrom
fix-hmc-off-idmat-collision
Jun 18, 2026
Merged

FIX: solve HMC-off identity transform collisions across PET series#331
mnoergaard merged 3 commits into
mainfrom
fix-hmc-off-idmat-collision

Conversation

@mnoergaard

Copy link
Copy Markdown
Collaborator

This fixes a --hmc-off failure mode where identity HMC transforms were written to a shared idmat.tfm path in the work directory. For multi-session or multi-run datasets, that file could be overwritten by another PET series with a different frame count, causing downstream resampling to crash when the transform count no longer matched the PET volume count.

Changes:

  1. Write HMC-off identity transforms to PET-series-specific filenames.
  2. Use the PET image frame count when generating identity transforms.
  3. Add an explicit transform-count validation error in resampling.
  4. Add regression tests for multi-series identity transform isolation and transform-count mismatch handling.

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.57143% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.40%. Comparing base (8a48d90) to head (27ac758).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
petprep/interfaces/resampling.py 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #331      +/-   ##
==========================================
+ Coverage   86.24%   86.40%   +0.15%     
==========================================
  Files          88       89       +1     
  Lines        9988    10052      +64     
  Branches     1056     1060       +4     
==========================================
+ Hits         8614     8685      +71     
+ Misses       1143     1134       -9     
- Partials      231      233       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@mnoergaard mnoergaard merged commit c3b0c68 into main Jun 18, 2026
22 checks passed
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