-
Notifications
You must be signed in to change notification settings - Fork 533
[ENH] added slice_encoding_direction input to TShift #2753
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 is there a simple way to add a test for that? |
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.
To test, I would add to the docstring:
## EXISTING
When the ``slice_timing`` input is used, the ``timing_file`` output is populated,
in this case with the generated file.
>>> tshift._list_outputs()['timing_file'] # doctest: +ELLIPSIS
'.../slice_timing.1D'
## NEW
>>> np.loadtxt(tshift._list_outputs()['timing_file'])[:5]
[0.0, 0.4, 0.8, 1.2, 1.6]
If ``slice_encoding_direction`` is set to ``'k-'``, the slice timing is reversed:
>>> tshift.slice_encoding_direction = 'k-'
>>> tshift.cmdline
'3dTshift -prefix functional_tshift -tpattern @slice_timing.1D -TR 2.5s -tzero 0.0 functional.nii'
>>> np.loadtxt(tshift._list_outputs()['timing_file'])[:5]
[15.6, 15.2, 14.8, 14.4, 14.0]
Seem reasonable?
Codecov Report
@@ Coverage Diff @@
## master #2753 +/- ##
==========================================
- Coverage 67.44% 64.03% -3.42%
==========================================
Files 340 338 -2
Lines 43164 43117 -47
Branches 5351 5349 -2
==========================================
- Hits 29110 27608 -1502
- Misses 13355 14430 +1075
- Partials 699 1079 +380
Continue to review full report at Codecov.
|
That all sounds reasonable. If there should be any other changes, I can take a look in a couple of days. |
This LGTM. If it passes the Travis tests for Python < 3.7, I'll merge. Thanks! |
Summary
Fixes #2752
List of changes proposed in this PR (pull-request)
slice_encoding_direction == k-
, reverseslice_timing
Acknowledgment