@@ -34,8 +34,8 @@ def run_reports(
34
34
bootstrap_file = None ,
35
35
out_filename = 'report.html' ,
36
36
reportlets_dir = None ,
37
- entities = None ,
38
37
errorname = 'report.err' ,
38
+ ** entities ,
39
39
):
40
40
"""
41
41
Run the reports.
@@ -79,8 +79,6 @@ def generate_reports(
79
79
80
80
errors = []
81
81
for subject_label in subject_list :
82
- entities = {}
83
- entities ['subject' ] = subject_label
84
82
85
83
# The number of sessions is intentionally not based on session_list but on the total number of sessions, because
86
84
# I want the final derivatives folder to be the same whether sessions were ran one at a time or all-together.
@@ -105,8 +103,8 @@ def generate_reports(
105
103
bootstrap_file = bootstrap_file ,
106
104
out_filename = html_report ,
107
105
reportlets_dir = reportlets_dir ,
108
- entities = entities ,
109
106
errorname = f'report-{ run_uuid } -{ subject_label } .err' ,
107
+ subject = subject_label ,
110
108
)
111
109
# If the report generation failed, append the subject label for which it failed
112
110
if report_error is not None :
@@ -129,7 +127,6 @@ def generate_reports(
129
127
html_report = '' .join (
130
128
[f"sub-{ subject_label .lstrip ('sub-' )} " , f'_ses-{ session_label } ' , '_func.html' ]
131
129
)
132
- entities ['session' ] = session_label
133
130
134
131
report_error = run_reports (
135
132
output_dir ,
@@ -138,8 +135,9 @@ def generate_reports(
138
135
bootstrap_file = bootstrap_file ,
139
136
out_filename = html_report ,
140
137
reportlets_dir = reportlets_dir ,
141
- entities = entities ,
142
138
errorname = f'report-{ run_uuid } -{ subject_label } -func.err' ,
139
+ subject = subject_label ,
140
+ session = session_label ,
143
141
)
144
142
# If the report generation failed, append the subject label for which it failed
145
143
if report_error is not None :
0 commit comments