From 1480b6d61361b55f77904b121768b946284e427b Mon Sep 17 00:00:00 2001 From: nasironeeb Date: Thu, 16 Apr 2026 16:25:53 +0200 Subject: [PATCH] fix: handle None timepoints in collect_config --- tools/scaling/scaling_cli.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/scaling/scaling_cli.py b/tools/scaling/scaling_cli.py index 832fd031..6526cacf 100644 --- a/tools/scaling/scaling_cli.py +++ b/tools/scaling/scaling_cli.py @@ -391,6 +391,7 @@ def collect_config( columns named "-1", "-2". timepoints : list[str] The timepoints to consider in the longitudinal analysis. + Default None. workflow_id : str The workflow declared name in brainprep CLI. workflow_parameters : str @@ -439,7 +440,11 @@ def collect_config( key = key[1:] if key[0] == "!" else key if key.endswith("s") and key[:-1] in long_dfs: df_ = long_dfs[key[:-1]] - df_ = df_.filter(regex=f"-({'|'.join(timepoints)})$").copy() + df_ = ( + df_.filter(regex=f"-({'|'.join(timepoints)})$").copy() + if timepoints is not None + else df_.copy() + ) subset = [ name for name in df_.columns