@@ -187,6 +187,9 @@ class SpecifyModelInputSpec(BaseInterfaceInputSpec):
187
187
realignment_parameters = InputMultiPath (File (exists = True ),
188
188
desc = "Realignment parameters returned by motion correction algorithm" ,
189
189
copyfile = False )
190
+ parameter_source = traits .Enum ("SPM" , "FSL" , "AFNI" , "NiPy" , "FSFAST" ,
191
+ desc = "Source of motion parameters" ,
192
+ mandatory = False )
190
193
outlier_files = InputMultiPath (File (exists = True ),
191
194
desc = "Files containing scan outlier indices that should be tossed" ,
192
195
copyfile = False )
@@ -375,10 +378,16 @@ def _generate_standard_design(self, infolist,
375
378
def _generate_design (self , infolist = None ):
376
379
"""Generate design specification for a typical fmri paradigm
377
380
"""
381
+ par_selection = slice (6 )
382
+ if isdefined (self .inputs .parameter_source ):
383
+ source = self .inputs .parameter_source
384
+ if source == 'FSFAST' :
385
+ par_selection = slice (1 , 7 )
378
386
realignment_parameters = []
379
387
if isdefined (self .inputs .realignment_parameters ):
380
388
for parfile in self .inputs .realignment_parameters :
381
- realignment_parameters .append (np .loadtxt (parfile ))
389
+ realignment_parameters .append (
390
+ np .loadtxt (parfile )[:, par_selection ])
382
391
outliers = []
383
392
if isdefined (self .inputs .outlier_files ):
384
393
for filename in self .inputs .outlier_files :
0 commit comments