Skip to content

Commit 08fecee

Browse files
authored
ENH: Flexibilize "sophisticated" pepolar to allow monomodal execution (#3393)
2 parents 2e4f921 + 729b5b9 commit 08fecee

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

fmriprep/workflows/base.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,15 @@ def init_single_subject_wf(subject_id: str):
580580
suffices = [s.suffix for s in estimator.sources]
581581

582582
if estimator.method == fm.EstimatorType.PEPOLAR:
583-
if len(suffices) == 2 and all(suf in ('epi', 'bold', 'sbref') for suf in suffices):
583+
# "Sophisticated" PEPOLAR schemes should be run "manually" with SDCFlows
584+
# The following two cases are not considered sophisticated:
585+
# 1. All PEPOLAR entities are the same modality
586+
# (typically, more than two EPI PE directions), or
587+
# 2. Two modalities are involved, with at most two images to pass
588+
# into FSL TOPUP.
589+
if len(set(suffices)) == 1 or (
590+
len(suffices) == 2 and all(suf in ('epi', 'bold', 'sbref') for suf in suffices)
591+
):
584592
wf_inputs = getattr(fmap_wf.inputs, f'in_{estimator.bids_id}')
585593
wf_inputs.in_data = [str(s.path) for s in estimator.sources]
586594
wf_inputs.metadata = [s.metadata for s in estimator.sources]

0 commit comments

Comments
 (0)