Skip to content

Commit 9fd80dc

Browse files
committed
fix: apply task to pet query
1 parent 0cc7f80 commit 9fd80dc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

niworkflows/utils/bids.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@
3535

3636
DEFAULT_BIDS_QUERIES = {
3737
'bold': {
38-
'datatype': 'func',
39-
'suffix': 'bold',
38+
'datatype': 'func',
39+
'suffix': 'bold',
4040
'part': ['mag', None],
41-
'task': Query.OPTIONAL,
42-
'echo': Query.OPTIONAL,
4341
},
4442
'dwi': {'suffix': 'dwi'},
4543
'flair': {'datatype': 'anat', 'suffix': 'FLAIR', 'part': ['mag', None]},
@@ -257,6 +255,7 @@ def collect_data(
257255
'return_type': 'file',
258256
'subject': participant_label,
259257
'extension': ['.nii', '.nii.gz'],
258+
'session': session_id or Query.OPTIONAL,
260259
}
261260

262261
reserved_entities = [('subject', participant_label), ('session', session_id)]
@@ -277,7 +276,7 @@ def collect_data(
277276
del layout_get_kwargs[entity]
278277

279278
if task:
280-
queries['bold']['task'] = task
279+
queries['bold']['task'] = queries['pet']['task'] = task
281280

282281
if echo:
283282
queries['bold']['echo'] = echo

0 commit comments

Comments
 (0)