From 916e15533c59e8e8bf2e5cd54077b7ea677d2e52 Mon Sep 17 00:00:00 2001 From: Hao-Ting Wang Date: Fri, 22 Sep 2023 14:56:18 -0400 Subject: [PATCH] ANY -> OPTIONAL for sessions and runs --- giga_connectome/tests/test_utils.py | 4 ++-- giga_connectome/utils.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/giga_connectome/tests/test_utils.py b/giga_connectome/tests/test_utils.py index 4e7578c..a475f49 100644 --- a/giga_connectome/tests/test_utils.py +++ b/giga_connectome/tests/test_utils.py @@ -15,8 +15,8 @@ def test_get_bids_images(): ) reindex_bids = True bids_filters = { - "bold": {"task": "probabilisticclassification", "run": "1"} - } + "bold": {"task": "probabilisticclassification", "run": "1"}, + } # task and run should apply to both mask and bold subj_data, _ = utils.get_bids_images( subjects, template, bids_dir, reindex_bids, bids_filters ) diff --git a/giga_connectome/utils.py b/giga_connectome/utils.py index 1321daa..cc5f801 100644 --- a/giga_connectome/utils.py +++ b/giga_connectome/utils.py @@ -29,10 +29,10 @@ def get_bids_images( layout_get_kwargs = { "return_type": "object", "subject": subjects, - "session": Query.ANY, + "session": Query.OPTIONAL, "space": template, "task": Query.ANY, - "run": Query.ANY, + "run": Query.OPTIONAL, "extension": ".nii.gz", } queries = {