@@ -158,7 +158,6 @@ class DeconvolveInputSpec(AFNICommandInputSpec):
158
158
requires = ['glt_sym' ])
159
159
160
160
161
-
162
161
class DeconvolveOutputSpec (TraitedSpec ):
163
162
pass
164
163
@@ -180,19 +179,23 @@ class Deconvolve(AFNICommand):
180
179
>>> stim_times = [(1, 'stims1.txt', 'SPMG1(4)'), (2, 'stims2.txt', 'SPMG2(4)')]
181
180
>>> deconvolve.inputs.stim_times = stim_times
182
181
>>> deconvolve.cmdline # doctest: +ALLOW_UNICODE
183
- '3dDeconvolve -input functional.nii -bucket output.nii -x1D output.1D -stim_times 1 stims1.txt SPMG1(4) 2 stims2.txt SPMG2(4)'
182
+ '3dDeconvolve -input functional.nii -bucket output.nii -x1D output -stim_times 1 stims1.txt SPMG1(4) 2 stims2.txt SPMG2(4)'
184
183
>>> res = deconvolve.run() # doctest: +SKIP
185
184
"""
186
185
187
186
_cmd = '3dDeconvolve'
188
187
input_spec = DeconvolveInputSpec
189
- output_spec = DeconvolveOutputSpec
188
+ output_spec = AFNICommandOutputSpec
190
189
191
190
def _list_outputs (self ):
192
191
outputs = self .output_spec ().get ()
193
192
if isdefined (self .inputs .x1D ):
194
193
if not self .inputs .x1D .endswith ('.xmat.1D' ):
195
- outputs ['x1D' ] = outputs ['x1D' ] + '.xmat.1D'
194
+ outputs ['x1D' ] = self .inputs .x1D + '.xmat.1D'
195
+ else :
196
+ outputs ['x1D' ] = self .inputs .x1D
197
+
198
+ outputs ['bucket' ] = self .inputs .bucket
196
199
return outputs
197
200
198
201
def _format_arg (self , name , trait_spec , value ):
@@ -207,5 +210,8 @@ def _format_arg(self, name, trait_spec, value):
207
210
arg += trait_spec .argstr % value
208
211
arg = arg .rstrip ()
209
212
return arg
213
+
214
+ if name == 'stim_times' :
215
+ self .inputs .num_stimts = len (value )
210
216
elif name == 'glt_sym' :
211
217
self .inputs .num_glt = len (value )
0 commit comments