|
60 | 60 | {'suffix': 'magnitude1', 'metadata': {'EchoTime': 0.005}},
|
61 | 61 | {
|
62 | 62 | 'suffix': 'epi',
|
63 |
| - 'direction': 'PA', |
| 63 | + 'dir': 'PA', |
64 | 64 | 'metadata': {'PhaseEncodingDirection': 'j', 'TotalReadoutTime': 0.6},
|
65 | 65 | },
|
66 | 66 | {
|
67 | 67 | 'suffix': 'epi',
|
68 |
| - 'direction': 'AP', |
| 68 | + 'dir': 'AP', |
69 | 69 | 'metadata': {'PhaseEncodingDirection': 'j-', 'TotalReadoutTime': 0.6},
|
70 | 70 | },
|
71 | 71 | ],
|
@@ -230,6 +230,25 @@ def test_init_fmriprep_wf(
|
230 | 230 | generate_expanded_graph(wf._create_flat_graph())
|
231 | 231 |
|
232 | 232 |
|
| 233 | +def test_init_fmriprep_wf_sanitize_fmaps(tmp_path): |
| 234 | + bids_dir = tmp_path / 'bids' |
| 235 | + |
| 236 | + spec = deepcopy(BASE_LAYOUT) |
| 237 | + spec['01']['func'][0]['metadata']['B0FieldSource'] = 'epi<<run1>>' |
| 238 | + spec['01']['fmap'][2]['metadata']['B0FieldIdentifier'] = 'epi<<run1>>' |
| 239 | + spec['01']['fmap'][3]['metadata']['B0FieldIdentifier'] = 'epi<<run1>>' |
| 240 | + del spec['01']['func'][4:] |
| 241 | + |
| 242 | + generate_bids_skeleton(bids_dir, spec) |
| 243 | + img = nb.Nifti1Image(np.zeros((10, 10, 10, 10)), np.eye(4)) |
| 244 | + for img_path in bids_dir.glob('sub-01/*/*.nii.gz'): |
| 245 | + img.to_filename(img_path) |
| 246 | + |
| 247 | + with mock_config(bids_dir=bids_dir): |
| 248 | + wf = init_fmriprep_wf() |
| 249 | + generate_expanded_graph(wf._create_flat_graph()) |
| 250 | + |
| 251 | + |
233 | 252 | def test_get_estimator_none(tmp_path):
|
234 | 253 | bids_dir = tmp_path / 'bids'
|
235 | 254 |
|
|
0 commit comments