Skip to content

Commit 82e9f8b

Browse files
authored
enh: comment code for maintainability
1 parent fd66f7c commit 82e9f8b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

fmriprep/workflows/base.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,18 @@ 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+
# "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.
583589
if (
584590
len(set(suffices)) == 1
585-
or (len(suffices) == 2 and all(suf in ('epi', 'bold', 'sbref') for suf in suffices))
591+
or (
592+
len(suffices) == 2
593+
and all(suf in ('epi', 'bold', 'sbref') for suf in suffices)
594+
)
586595
):
587596
wf_inputs = getattr(fmap_wf.inputs, f'in_{estimator.bids_id}')
588597
wf_inputs.in_data = [str(s.path) for s in estimator.sources]

0 commit comments

Comments
 (0)