diff --git a/fmriprep/workflows/bold/fit.py b/fmriprep/workflows/bold/fit.py index 5428a3a35..ced7b7523 100644 --- a/fmriprep/workflows/bold/fit.py +++ b/fmriprep/workflows/bold/fit.py @@ -205,6 +205,10 @@ def init_bold_fit_wf( layout = config.execution.layout + # Fitting operates on the shortest echo + # This could become more complicated in the future + bold_file = bold_series[0] + # Collect sbref files, sorted by EchoTime sbref_files = get_sbrefs( bold_series, @@ -212,9 +216,16 @@ def init_bold_fit_wf( layout=layout, ) - # Fitting operates on the shortest echo - # This could become more complicated in the future - bold_file = bold_series[0] + basename = os.path.basename(bold_file) + sbref_msg = f"No single-band-reference found for {basename}." + if sbref_files and "sbref" in config.workflow.ignore: + sbref_msg = f"Single-band reference file(s) found for {basename} and ignored." + sbref_files = [] + elif sbref_files: + sbref_msg = "Using single-band reference file(s) {}.".format( + ",".join([os.path.basename(sbf) for sbf in sbref_files]) + ) + config.loggers.workflow.info(sbref_msg) # Get metadata from BOLD file(s) entities = extract_entities(bold_series)