Skip to content

Commit 1833724

Browse files
committed
Apply only participant filter to template discovery in all pipeline
Template generation needs all sessions to find multi-session subjects. The session/task filters should only apply to per-session stages (anat, func, metrics, qc), not to discover_template_inputs which requires the full cross-session view.
1 parent 6ef4fd6 commit 1833724

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • src/rbc/orchestration/longitudinal

src/rbc/orchestration/longitudinal/all.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ def run(
8888
df = load_table(
8989
dataset_dirs=input_dirs, index_fpath=None, max_workers=0, verbose=verbose
9090
)
91-
tpl_inputs, skipped = discover_template_inputs(filters.apply(df))
91+
# Template discovery needs all sessions (not just the filtered ones),
92+
# so apply only the participant filter here.
93+
tpl_filters = Filters(participant_label=filters.participant_label)
94+
tpl_inputs, skipped = discover_template_inputs(tpl_filters.apply(df))
9295
for sub in skipped:
9396
_logger.warning(
9497
"Skipping sub-%s: only one preprocessed T1w brain volume found.",

0 commit comments

Comments
 (0)