From 0beceecb101706f67993858c049de052339e1015 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Tue, 9 Jul 2024 15:34:35 -0400 Subject: [PATCH] FIX: Validate and summarize multi-volume sbrefs --- fmriprep/workflows/bold/fit.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fmriprep/workflows/bold/fit.py b/fmriprep/workflows/bold/fit.py index f66d49eb..2f98ad6e 100644 --- a/fmriprep/workflows/bold/fit.py +++ b/fmriprep/workflows/bold/fit.py @@ -464,7 +464,14 @@ def init_bold_fit_wf( config.loggers.workflow.info('Stage 3: Adding coregistration boldref workflow') # Select initial boldref, enhance contrast, and generate mask - fmapref_buffer.inputs.sbref_files = sbref_files + if sbref_files: + raw_sbref_wf = init_raw_boldref_wf( + name='raw_sbref_wf', + bold_file=sbref_files, + multiecho=len(sbref_files) > 1, + ) + workflow.connect(raw_sbref_wf, 'outputnode.boldref', fmapref_buffer, 'sbref_files') + enhance_boldref_wf = init_enhance_and_skullstrip_bold_wf(omp_nthreads=omp_nthreads) ds_coreg_boldref_wf = init_ds_boldref_wf(