We have a multi-session scan with several subjects. Each subject completed between 2-4 sessions and each session was between 1-5 runs.
Is there a way we can set up an iterable to take in a different number of runs for every session and every subject?
I was hoping we could pass a dictionary like where the first level is the subject ID, the second level is the session and the third level is the runs that were administered.
subj_dictionary = {'22014': {'1' : ['1','2','3'] ,'2': ['1','2','3','4']},
'21008': {'1' : ['2','3','4'] ,'3': ['1','2','3']}}
Currently we are implementing like:
subject_list = [ '22014','21008'#,'11013','12006']
session_list = ['1','2','3','4']
run_list = ['1','2','3','4','5']
infosource = pe.Node(
interface=util.IdentityInterface(
fields=['subject_id','session_id','run_id']),
name="infosource")
infosource.iterables = ([('subject_id', subject_list), ('run_id',run_list),('session_id',session_list)])
But obviously that assumes the same # of runs for each session and the same number of sessions for each subject.
Is there another approach we’re missing?