-
Notifications
You must be signed in to change notification settings - Fork 532
ENH: Allow CompCor to skip initial volumes #2122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@effigies - zero-padding will change the filter characteristics. if necessary this should be applied only to the pca components. on the other hand you can add N columns with a 1 at the location for every volume that is discarded (similar to ArtifactDetect). |
nipype/algorithms/confounds.py
Outdated
if nvols: | ||
ss_col = np.zeros((components.shape[0], 1), | ||
dtype=filter_basis.dtype) | ||
ss_col[:nvols] = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should model each volume with a separate regressor. Like artifacts in ArtDetect
@satra Ah, you're right. The "steady state" column should be N columns with a single 1 in each. But to be clear, the data is truncated, the filter basis is constructed and applied before extracting the components. After that, the filter basis is zero-padded, to include in the GLM along with the components. Does that resolve the issue for you, or is there a problem I'm missing? |
5c89ec5
to
ccbce0f
Compare
Codecov Report
@@ Coverage Diff @@
## master #2122 +/- ##
=========================================
Coverage ? 47.44%
=========================================
Files ? 115
Lines ? 23564
Branches ? 0
=========================================
Hits ? 11180
Misses ? 12384
Partials ? 0
Continue to review full report at Codecov.
|
@satra I believe the CircleCI issues are unrelated to this PR. I also added docs to explain the behavior of this change and the high-pass filter. Let me know what you think. |
Sorry. Realized a bug was being picked up downstream. Will check the box when ready. |
ef85a78
to
16ec368
Compare
@satra Sorry to bug you, but do you have any issues with this as it stands? |
lgtm |
Follow-up to #2107.
Changes proposed in this pull request
NonSteadyStateDetector
interfacefilter_basis
filter_basis
andcomponents
are calculated on the truncated series, then zero-padded to fit original seriesTodo: