From 18af918e36e4cb70e3daf71db21f784281be2db3 Mon Sep 17 00:00:00 2001 From: Michael Notter Date: Tue, 29 Nov 2016 22:35:54 +0100 Subject: [PATCH 1/2] changes slice_order type from Int to Float With the newer SPM12, it is now possible to use "slice onsets" in milliseconds, instead of the good old simple slice order. I've tested if there is any difference between slice_order [0 1 2 3,...] or [0.0 1.0 2.0 3.0,...] and with my test data there was none. SPM12 and SPM8, both accept the float point approach, but SPM8 crashes if one tries to use actual onsets, i.e. [0.0 66.66 133.33, 200.0...]. --- nipype/interfaces/spm/preprocess.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/spm/preprocess.py b/nipype/interfaces/spm/preprocess.py index 3fa7608434..2ed5f2eb9d 100644 --- a/nipype/interfaces/spm/preprocess.py +++ b/nipype/interfaces/spm/preprocess.py @@ -46,8 +46,8 @@ class SliceTimingInputSpec(SPMCommandInputSpec): desc=('time of volume acquisition. usually' 'calculated as TR-(TR/num_slices)'), mandatory=True) - slice_order = traits.List(traits.Int(), field='so', - desc=('1-based order in which slices are ' + slice_order = traits.List(traits.Float(), field='so', + desc=('1-based order or onset in which slices are ' 'acquired'), mandatory=True) ref_slice = traits.Int(field='refslice', From 2fc998b1f9bc96f73f46f28831ffa3377208f148 Mon Sep 17 00:00:00 2001 From: Michael Notter Date: Mon, 5 Dec 2016 10:26:37 +0100 Subject: [PATCH 2/2] clarify description The exact description of SPM is as follows: "Alternatively you can enter the slice timing in ms for each slice individually. If doing so, the next item (Reference Slice) will contain a reference time (in ms) instead of the slice index of the reference slice." --- nipype/interfaces/spm/preprocess.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/spm/preprocess.py b/nipype/interfaces/spm/preprocess.py index 2ed5f2eb9d..9039c03aad 100644 --- a/nipype/interfaces/spm/preprocess.py +++ b/nipype/interfaces/spm/preprocess.py @@ -47,11 +47,13 @@ class SliceTimingInputSpec(SPMCommandInputSpec): 'calculated as TR-(TR/num_slices)'), mandatory=True) slice_order = traits.List(traits.Float(), field='so', - desc=('1-based order or onset in which slices are ' - 'acquired'), + desc=('1-based order or onset (in ms) in which ' + 'slices are acquired'), mandatory=True) ref_slice = traits.Int(field='refslice', - desc='1-based Number of the reference slice', + desc='1-based Number of the reference slice or ' + 'reference time point if slice_order is in ' + 'onsets (ms)', mandatory=True) out_prefix = traits.String('a', field='prefix', usedefault=True, desc='slicetimed output prefix')