Add optional smoothing Fix #212#310
Open
jpillai00 wants to merge 13 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an optional --smooth FWHM parameter across rbc metrics, rbc functional, and rbc all so that smoothing is no longer always performed; raw + z-scored raw derivatives are always produced, and smoothed variants are emitted only when requested.
Changes:
- Replace required/default smoothing (
fwhm=6.0) with optionalsmooth: float | Nonethroughout CLI args, orchestration, and workflows. - Update metrics workflow outputs to always include raw + z-scored raw maps, and optionally include smoothed + z-scored smoothed maps.
- Extend export + test coverage for conditional smoothed outputs and correct BIDS
desc-label construction.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/orchestration/test_functional.py | Updates orchestration test to use smooth instead of fwhm. |
| tests/unit/cli/test_metrics.py | Updates metrics CLI tests for --smooth default/validation and parser wiring. |
| tests/unit/cli/test_functional.py | Adds smooth to functional CLI namespace fixture. |
| tests/unit/cli/test_all.py | Updates all CLI tests for --smooth default/validation and parser wiring. |
| tests/unit/bids/test_exports.py | Updates export fixtures/count assertions; adds tests for conditional smoothed exports and desc labels. |
| tests/full_pipeline/test_metrics.py | Adjusts pipeline test to tolerate optional (None) outputs. |
| src/rbc/workflows/metrics.py | Makes smoothing optional; always computes z-scored raw maps; adds optional smoothed + z-scored smoothed outputs. |
| src/rbc/workflows/functional.py | Adds optional smoothing path for cleaned BOLD export. |
| src/rbc/orchestration/metrics.py | Threads smooth through orchestration and passes it into exports. |
| src/rbc/orchestration/functional.py | Threads smooth through functional orchestration and exports. |
| src/rbc/orchestration/all.py | Threads smooth through the combined pipeline for metrics exporting. |
| src/rbc/cli/metrics.py | Renames --fwhm to --smooth, makes it optional, and updates validation/args. |
| src/rbc/cli/functional.py | Adds optional --smooth to functional CLI and passes through to orchestration. |
| src/rbc/cli/all.py | Renames --fwhm to --smooth, makes it optional, and updates validation/args. |
| src/rbc/bids/metrics.py | Exports raw + z-scored raw always; conditionally exports smoothed variants when smooth is set. |
| src/rbc/bids/functional.py | Conditionally exports smoothed cleaned BOLD when requested. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9b18298 to
2a3aa8e
Compare
Contributor
|
There is a missing period in |
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.
Adds
--smooth FWHMflag torbc metrics,rbc functional,rbc all,rbc longitudinal metrics,rbc longitudinal functional, andrbc longitudinal allto control smoothing of derivative outputs and cleaned BOLD.Changes:
desc-zstd) are always produced. When--smooth FWHMis set, the following are additionally exported:desc-sm{fwhm}) and z-scored smoothed (desc-sm{fwhm}Zstd)desc-sm{fwhm}preproc), export-only, applied post-regression and bandpass filteringrbc.core.metrics.smoothingtorbc.core.common3dBlurToFWHMthat it correctly handles both 3D derivative maps and 4D BOLD timeseries