From 919ccc13b67bdff437265345dfa22dbc41b986b2 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 28 Mar 2024 10:52:12 -0400 Subject: [PATCH] Change default `--min-time` from 100 to 240 (#1115) --- xcp_d/cli/parser.py | 20 +++++++++++--------- xcp_d/config.py | 2 +- xcp_d/tests/test_cli.py | 4 ++++ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/xcp_d/cli/parser.py b/xcp_d/cli/parser.py index b51bb6fad..9be52ad1f 100644 --- a/xcp_d/cli/parser.py +++ b/xcp_d/cli/parser.py @@ -406,16 +406,18 @@ def _bids_filter(value, parser): "--min-time", "--min_time", required=False, - default=100, + default=240, type=float, - help=( - "Post-scrubbing threshold to apply to individual runs in the dataset. " - "This threshold determines the minimum amount of time, in seconds, " - "needed to post-process a given run, once high-motion outlier volumes are removed. " - "This will have no impact if scrubbing is disabled " - "(i.e., if the FD threshold is zero or negative). " - "This parameter can be disabled by providing a zero or a negative value." - ), + help="""\ +Post-scrubbing threshold to apply to individual runs in the dataset. +This threshold determines the minimum amount of time, in seconds, +needed to post-process a given run, once high-motion outlier volumes are removed. +This will have no impact if scrubbing is disabled +(i.e., if the FD threshold is zero or negative). +This parameter can be disabled by providing a zero or a negative value. + +The default is 240 (4 minutes). +""", ) g_temporal_filter = parser.add_argument_group( diff --git a/xcp_d/config.py b/xcp_d/config.py index 2f3fe2d0f..7dbe500e3 100644 --- a/xcp_d/config.py +++ b/xcp_d/config.py @@ -544,7 +544,7 @@ class workflow(_Config): """Radius of the head in mm.""" fd_thresh = 0.3 """Framewise displacement threshold for censoring.""" - min_time = 100 + min_time = 240 """Post-scrubbing threshold to apply to individual runs in the dataset.""" bandpass_filter = True """Apply a band-pass filter to the data.""" diff --git a/xcp_d/tests/test_cli.py b/xcp_d/tests/test_cli.py index 7ff25fae8..783999993 100644 --- a/xcp_d/tests/test_cli.py +++ b/xcp_d/tests/test_cli.py @@ -56,6 +56,7 @@ def test_ds001419_nifti(data_dir, output_dir, working_dir): "--skip-parcellation", "--skip-dcan-qc", "--random-seed=8675309", + "--min-time=100", ] _run_and_generate( test_name=test_name, @@ -97,6 +98,7 @@ def test_ds001419_cifti(data_dir, output_dir, working_dir): "--dummy-scans=auto", "--fd-thresh=0.3", "--upper-bpf=0.0", + "--min-time=100", "--exact-time", "80", "200", @@ -137,6 +139,7 @@ def test_ukbiobank(data_dir, output_dir, working_dir): "--skip-dcan-qc", "--min-coverage=0.1", "--random-seed=8675309", + "--min-time=100", ] _run_and_generate( test_name=test_name, @@ -248,6 +251,7 @@ def test_pnc_cifti_t2wonly(data_dir, output_dir, working_dir): "--atlases", "4S156Parcels", "Glasser", + "--min-time=100", ] _run_and_generate( test_name=test_name,