Skip to content

Commit d67d660

Browse files
committed
docstring testing slice_encoding_direction
1 parent 3c7d0c2 commit d67d660

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2665,6 +2665,17 @@ class TShift(AFNICommand):
26652665
>>> tshift._list_outputs()['timing_file'] # doctest: +ELLIPSIS
26662666
'.../slice_timing.1D'
26672667
2668+
>>> np.loadtxt(tshift._list_outputs()['timing_file'])[:5]
2669+
[0.0, 0.4, 0.8, 1.2, 1.6]
2670+
2671+
If ``slice_encoding_direction`` is set to ``'k-'``, the slice timing is reversed:
2672+
2673+
>>> tshift.inputs.slice_encoding_direction = 'k-'
2674+
>>> tshift.cmdline
2675+
'3dTshift -prefix functional_tshift -tpattern @slice_timing.1D -TR 2.5s -tzero 0.0 functional.nii'
2676+
>>> np.loadtxt(tshift._list_outputs()['timing_file'])[:5]
2677+
[15.6, 15.2, 14.8, 14.4, 14.0]
2678+
26682679
This method creates a ``slice_timing.1D`` file to be passed to ``3dTshift``.
26692680
A pre-existing slice-timing file may be used in the same way:
26702681

0 commit comments

Comments
 (0)