Skip to content

Commit 0cc7f80

Browse files
committed
FIX: apply suggestion from code review
1 parent 0cb2bf7 commit 0cc7f80

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

niworkflows/utils/bids.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@
3434
from packaging.version import Version
3535

3636
DEFAULT_BIDS_QUERIES = {
37-
'bold': {'datatype': 'func', 'suffix': 'bold', 'part': ['mag', None]},
37+
'bold': {
38+
'datatype': 'func',
39+
'suffix': 'bold',
40+
'part': ['mag', None],
41+
'task': Query.OPTIONAL,
42+
'echo': Query.OPTIONAL,
43+
},
3844
'dwi': {'suffix': 'dwi'},
3945
'flair': {'datatype': 'anat', 'suffix': 'FLAIR', 'part': ['mag', None]},
4046
'fmap': {'datatype': 'fmap'},
@@ -270,6 +276,12 @@ def collect_data(
270276
# avoid clobbering layout.get
271277
del layout_get_kwargs[entity]
272278

279+
if task:
280+
queries['bold']['task'] = task
281+
282+
if echo:
283+
queries['bold']['echo'] = echo
284+
273285
subj_data = {
274286
dtype: sorted(layout.get(**layout_get_kwargs, **query)) for dtype, query in queries.items()
275287
}

0 commit comments

Comments
 (0)