@@ -284,7 +284,7 @@ def get_subjectinfo(subject_id, base_dir, task_id, model_id):
284284 for idx in range (n_tasks ):
285285 taskidx = np .where (taskinfo [:, 0 ] == 'task%03d' % (idx + 1 ))
286286 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])
288288 files = sorted (glob (os .path .join (base_dir ,
289289 subject_id ,
290290 'BOLD' ,
@@ -471,6 +471,22 @@ def get_contrasts(contrast_file, task_id, conds):
471471 name = "modelspec" )
472472 modelspec .inputs .input_units = 'secs'
473473
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+ '''
474490 def check_behav_list (behav , conds ):
475491 from nipype .external import six
476492 import numpy as np
0 commit comments