Skip to content

ENH: Expand BOLD coregistration targets#546

Open
mgxd wants to merge 27 commits into
masterfrom
enh/coreg-bolds
Open

ENH: Expand BOLD coregistration targets#546
mgxd wants to merge 27 commits into
masterfrom
enh/coreg-bolds

Conversation

@mgxd

@mgxd mgxd commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Replaces #517

Adds --bold-coreg-level, which allows setting the BOLD coregistration level as either: run (current behavior, a separate reference image is calculated and registered to the anatomical reference independently for each run) or session (all run-level BOLD references within a session are combined into a session template before registering to anatomical).

@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.05348% with 56 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.87%. Comparing base (015cdfc) to head (37de3d8).

Files with missing lines Patch % Lines
nibabies/workflows/bold/fit.py 15.78% 16 Missing ⚠️
nibabies/workflows/base.py 83.72% 9 Missing and 5 partials ⚠️
nibabies/workflows/bold/outputs.py 25.00% 9 Missing ⚠️
nibabies/utils/derivatives.py 30.00% 5 Missing and 2 partials ⚠️
nibabies/workflows/bold/base.py 50.00% 5 Missing and 2 partials ⚠️
nibabies/workflows/bold/template.py 85.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #546      +/-   ##
==========================================
+ Coverage   61.64%   61.87%   +0.22%     
==========================================
  Files          73       74       +1     
  Lines        7057     7186     +129     
  Branches      868      883      +15     
==========================================
+ Hits         4350     4446      +96     
- Misses       2438     2465      +27     
- Partials      269      275       +6     

☔ View full report in Codecov by Sentry.
📢 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.

@mgxd mgxd marked this pull request as ready for review May 29, 2026 16:13
mgxd added 6 commits May 29, 2026 14:41
Establishes a consistent four-level hierarchy (orig → run → boldref → anat)
to replace ad-hoc naming that hardcoded the session level and conflated
"per-run boldref" with "coregistration reference".

Key renames:
- orig_boldref → run_boldref (per-run reference)
- session_boldref → boldref_template (level-agnostic aggregated reference)
- orig2session_xfm → run2boldref_xfm (internal fields and output filenames)
- space-session → space-boldref (BIDS output entity)
- HMC transform: from-orig_to-boldref → from-orig_to-run

Legacy fallbacks in utils/derivatives.py handle precomputed derivatives
written under the old naming convention.
@mgxd mgxd requested a review from effigies June 1, 2026 14:59
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