File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -284,6 +284,25 @@ def test_get_estimator_b0field_and_intendedfor(tmp_path):
284
284
)
285
285
286
286
assert get_estimator (layout , bold_files [0 ]) == ('epi' ,)
287
+ # if B0FieldIdentifiers are found, IntendedFor will not be used
288
+ assert get_estimator (layout , bold_files [1 ]) == ()
289
+
290
+
291
+ def test_get_estimator_intendedfor (tmp_path ):
292
+ bids_dir = tmp_path / 'bids'
293
+
294
+ # Set B0FieldSource for run 1
295
+ spec = deepcopy (BASE_LAYOUT )
296
+ spec ['01' ]['fmap' ][0 ]['metadata' ]['IntendedFor' ] = 'func/sub-01_task-rest_run-2_bold.nii.gz'
297
+
298
+ generate_bids_skeleton (bids_dir , spec )
299
+ layout = bids .BIDSLayout (bids_dir )
300
+ _ = find_estimators (layout = layout , subject = '01' )
301
+
302
+ bold_files = sorted (
303
+ layout .get (suffix = 'bold' , task = 'rest' , extension = '.nii.gz' , return_type = 'file' )
304
+ )
305
+
287
306
assert get_estimator (layout , bold_files [1 ]) == ('auto_00000' ,)
288
307
289
308
You can’t perform that action at this time.
0 commit comments