Skip to content

Add --censor-between parameter to censor short sets of nonoutliers between outliers - #1628

Merged
tsalo merged 18 commits into
mainfrom
censor-between
Aug 10, 2026
Merged

Add --censor-between parameter to censor short sets of nonoutliers between outliers#1628
tsalo merged 18 commits into
mainfrom
censor-between

Conversation

@tsalo

@tsalo tsalo commented Jul 30, 2026

Copy link
Copy Markdown
Member

Closes none, but relates to #724 and #1159. --censor-between N censors any contiguous segment of non-outlier volumes of length N or fewer. Default is 0 in every mode (for now).

Changes proposed in this pull request

  • New function censor_between_outliers.
  • New interface ExpandTemporalMask.
  • Temporal mask will now have two new columns: censor_between and denoising (the union of framewise_displacement and censor_between.

tsalo and others added 13 commits July 30, 2026 10:26
Adds the CLI argument, the config.workflow field, and placeholder TODOs
marking where the temporal-mask expansion will go.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tsalo tsalo added the enhancement New feature or request label Jul 30, 2026
tsalo and others added 3 commits July 30, 2026 16:04
--censor-between is required in 'none' mode, so test_ds001419_nifti
failed parameter validation. Set to 0 to preserve existing behavior.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.21739% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.19%. Comparing base (6e7ee34) to head (3e29334).

Files with missing lines Patch % Lines
xcp_d/interfaces/utils.py 28.57% 5 Missing ⚠️
xcp_d/utils/plotting.py 33.33% 2 Missing ⚠️
xcp_d/interfaces/plotting.py 87.50% 1 Missing ⚠️
xcp_d/interfaces/restingstate.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1628      +/-   ##
==========================================
+ Coverage   82.64%   83.19%   +0.55%     
==========================================
  Files          58       58              
  Lines        8026     8094      +68     
  Branches     1132     1137       +5     
==========================================
+ Hits         6633     6734     +101     
+ Misses       1046     1014      -32     
+ Partials      347      346       -1     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tsalo

tsalo commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

@LuciMoore @madisoth does this do what you need?

@madisoth

madisoth commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Just got around to testing this and it just needs to also have the censoring applied to the masks in the ABCC QC hdf5 file (and the remaining frames, mean FD, etc. to reflect the extra censoring) -- the rest looks all good to me.

@tsalo
tsalo merged commit 9aa3f2a into main Aug 10, 2026
21 checks passed
@tsalo
tsalo deleted the censor-between branch August 10, 2026 14:28
@tsalo

tsalo commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

@madisoth I made the change you requested and have released 26.2.0rc1. Can you test it out to make sure it does what you want before I release 26.2.0?

@madisoth

Copy link
Copy Markdown
Collaborator

looks good, thanks!

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants