Skip to content

Commit

Permalink
bold corr with sub T1
Browse files Browse the repository at this point in the history
- boldref correlated with subject T1
  • Loading branch information
surchs committed Jul 6, 2020
1 parent 6585986 commit f42cc50
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dashQC_fmri/fmriprep_report2.py
Expand Up @@ -255,7 +255,7 @@ def make_run_str(run_report):
return out_str


def report_run(run):
def report_run(run, temp_ref):
# TODO remove first nan from FD
conf = pd.read_csv(run['confound'], sep='\t')
# First add motion parameters
Expand All @@ -279,7 +279,8 @@ def report_run(run):
report['scrubbed'] = [float(scrub) for scrub in scrubbed]
report['fd'] = [float(f) for f in fd]
# Placeholder for current dashboard
report['corr_run_ref'] = 1
report['corr_run_ref'] = brain_correlation(
run['boldref'], temp_ref['t1'])
return report


Expand All @@ -299,7 +300,8 @@ def report_subject(sub, temp):
report['corr_BOLD_T1'] = brain_correlation(
boldref_avg, temp['T1']) # replace with MNI
report['run_names'] = runs.keys()
report['runs'] = {run_name: report_run(runs[run_name]) for run_name in report['run_names']}
report['runs'] = {run_name: report_run(
runs[run_name], sub) for run_name in report['run_names']}
return report


Expand Down

0 comments on commit f42cc50

Please sign in to comment.