-
Notifications
You must be signed in to change notification settings - Fork 304
[ENH] Respect SliceEncodingDirection metadata #1350
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
Thanks for opening this pull request! We have detected this is the first time for you to contribute to fMRIPrep. Please check out our contributing guidelines.
Of course, if you want to opt-out this time there is no problem at all with adding your name later. You will be always welcome to add it in the future whenever you feel it should be listed. |
@effigies thanks for merging the nipype PR. I can't figure out how to get the newest nipype version into fmriprep. Via niworkflows? |
Once the new nipype is released, we'll incorporate the fix here. We're waiting on one fix in nipype before release (scheduled for Monday anyway). |
Although, you can pin to the latest nipype commit in requirements.txt, for testing purposes:
|
If you update the nipype dependency to |
Thanks. I am still running some tests. I'll get back to you when they are done. |
fmriprep/workflows/bold/stc.py
Outdated
@@ -71,6 +71,8 @@ def init_bold_stc_wf(metadata, name='bold_stc_wf'): | |||
tr='{}s'.format(metadata["RepetitionTime"]), | |||
slice_timing=metadata['SliceTiming']), | |||
name='slice_timing_correction') | |||
if 'SliceEncodingDirection' in metadata: | |||
slice_timing_correction.inputs.slice_encoding_direction = metadata['SliceEncodingDirection'] |
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.
Maybe we could be as clear (and not hit line length limits) by just adding slice_encoding_direction=metadata.get('SliceEncodingDirection', 'k')
to the TShift()
call.
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.
OK. I have tested the previous version and this looks good
- same list order, different direction gives different results (as expected)
- flipped list, flipped direction gives same results (as expected)
- no direction vs "k" gives same results (as expected)
LGTM. I merged master in, as there've been some updates to the tests and CI config. If this tests clean, I'll merge right away. |
Thanks! |
Changes proposed in this pull request
closes #1345
adds slice encoding direction to stc
depends on nipype PR#2753
Documentation that should be reviewed
Not sure...