Skip to content

Commit 3e68e98

Browse files
committed
fix: task_id indexing into run_ids
1 parent 534d5a3 commit 3e68e98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/fmri_ants_openfmri.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def get_subjectinfo(subject_id, base_dir, task_id, model_id):
563563
runs = [int(val[-3:]) for val in files]
564564
run_ids.insert(idx, runs)
565565
json_info = os.path.join(base_dir, subject_id, 'BOLD',
566-
'task%03d_run%03d' % (task_id, run_ids[0]),
566+
'task%03d_run%03d' % (task_id, run_ids[task_id - 1][0]),
567567
'bold_scaninfo.json')
568568
if os.path.exists(json_info):
569569
import json
@@ -572,7 +572,7 @@ def get_subjectinfo(subject_id, base_dir, task_id, model_id):
572572
TR = data['global']['const']['RepetitionTime']/1000.
573573
else:
574574
task_scan_key = os.path.join(base_dir, subject_id, 'BOLD',
575-
'task%03d_run%03d' % (task_id, run_ids[0]),
575+
'task%03d_run%03d' % (task_id, run_ids[task_id - 1][0]),
576576
'scan_key.txt')
577577
if os.path.exists(task_scan_key):
578578
TR = np.genfromtxt(task_scan_key)[1]

0 commit comments

Comments
 (0)