@@ -111,8 +111,9 @@ class FSLXCommandInputSpec(FSLCommandInputSpec):
111
111
desc = 'b values file' )
112
112
113
113
logdir = Directory ('.' , argstr = '--logdir=%s' , usedefault = True )
114
- n_fibres = traits .Range (low = 1 , argstr = '--nfibres=%d' , desc = ('Maximum '
115
- 'number of fibres to fit in each voxel' ))
114
+ n_fibres = traits .Range (
115
+ 2 , usedefault = True , low = 1 , argstr = '--nfibres=%d' ,
116
+ desc = ('Maximum number of fibres to fit in each voxel' ))
116
117
model = traits .Enum (1 , 2 , argstr = '--model=%d' ,
117
118
desc = ('use monoexponential (1, default, required for '
118
119
'single-shell) or multiexponential (2, multi-'
@@ -200,7 +201,9 @@ def _run_interface(self, runtime):
200
201
201
202
def _list_outputs (self ):
202
203
outputs = self .output_spec ().get ()
203
- out_dir = self ._out_dir
204
+ n_fibres = 2
205
+ if isdefined (self .inputs .n_fibres ):
206
+ n_fibres = self .inputs .n_fibres
204
207
205
208
if isdefined (self .inputs .logdir ):
206
209
out_dir = os .path .abspath (self .inputs .logdir )
@@ -222,13 +225,13 @@ def _list_outputs(self):
222
225
for k in multi_out :
223
226
outputs [k ] = []
224
227
225
- for i in xrange (1 , self . inputs . n_fibres + 1 ):
228
+ for i in xrange (1 , n_fibres + 1 ):
226
229
outputs ['fsamples' ].append (self ._gen_fname ('f%dsamples' % i ,
227
230
cwd = out_dir ))
228
231
outputs ['mean_fsamples' ].append (self ._gen_fname (('mean_f%d'
229
232
'samples' ) % i , cwd = out_dir ))
230
233
231
- for i in xrange (1 , self . inputs . n_fibres + 1 ):
234
+ for i in xrange (1 , n_fibres + 1 ):
232
235
outputs ['dyads' ].append (self ._gen_fname ('dyads%d' % i ,
233
236
cwd = out_dir ))
234
237
outputs ['phsamples' ].append (self ._gen_fname ('ph%dsamples' % i ,
0 commit comments