FIX: Restrict carpet plot crown mask to BOLD coverage - #3642
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3642 +/- ##
==========================================
- Coverage 74.57% 74.41% -0.16%
==========================================
Files 62 62
Lines 4975 4988 +13
Branches 637 637
==========================================
+ Hits 3710 3712 +2
- Misses 1131 1142 +11
Partials 134 134 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
lobennett
force-pushed
the
fix/crown-coverage-clip
branch
from
April 30, 2026 01:00
4234079 to
d5a0c10
Compare
lobennett
force-pushed
the
fix/crown-coverage-clip
branch
from
April 30, 2026 02:45
d5a0c10 to
1b82ebc
Compare
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.
Closes #3359.
Changes proposed in this pull request
_clip_mask_to_coveragehelper infmriprep/workflows/bold/confounds.pythatrestricts a mask to voxels with non-zero BOLD variance.
crown_clipFunction node toinit_bold_confs_wfand route it betweensubtract_maskand the three downstream consumers (outputnode.crown_mask,crowncompcor.mask_files,mrg_compcor.in3).Why
When the brain mask is dilated past the BOLD coverage region, the resulting
crown includes voxels with no time-series content. These zero-variance rows are
grouped together by the carpet plot's row-sort and surface as a flat gray band:
This is a visualization-only change;
edge_comp_*columns indesc-confounds_timeseries.tsvare unaffected (zero-variance voxels contributenothing to PCA). See the issue thread for the verification.