@@ -284,7 +284,7 @@ def get_subjectinfo(subject_id, base_dir, task_id, model_id):
284
284
for idx in range (n_tasks ):
285
285
taskidx = np .where (taskinfo [:, 0 ] == 'task%03d' % (idx + 1 ))
286
286
conds .append ([condition .replace (' ' , '_' ) for condition
287
- in taskinfo [taskidx [0 ], 2 ] if 'junk' not in condition ])
287
+ in taskinfo [taskidx [0 ], 2 ]]) # if 'junk' not in condition])
288
288
files = sorted (glob (os .path .join (base_dir ,
289
289
subject_id ,
290
290
'BOLD' ,
@@ -471,6 +471,22 @@ def get_contrasts(contrast_file, task_id, conds):
471
471
name = "modelspec" )
472
472
modelspec .inputs .input_units = 'secs'
473
473
474
+ '''
475
+ def check_behav_list(behav):
476
+ from nipype.external import six
477
+ out_behav = []
478
+ if isinstance(behav, six.string_types):
479
+ behav = [behav]
480
+ for val in behav:
481
+ if not isinstance(val, list):
482
+ out_behav.append([val])
483
+ else:
484
+ out_behav.append(val)
485
+ return out_behav
486
+
487
+ wf.connect(subjinfo, 'TR', modelspec, 'time_repetition')
488
+ wf.connect(datasource, ('behav', check_behav_list), modelspec, 'event_files')
489
+ '''
474
490
def check_behav_list (behav , conds ):
475
491
from nipype .external import six
476
492
import numpy as np
0 commit comments