Skip to content

Commit fbc5ce7

Browse files
authored
Merge pull request #534 from olgn/phasediff-magnitude1
each phasediff should be accompanied by a magnitude1 file
2 parents 1f9788a + 95a066c commit fbc5ce7

File tree

43 files changed

+234
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+234
-0
lines changed

tests/bids.spec.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,4 +245,26 @@ var suite = describe('BIDS example datasets ', function() {
245245
isdone()
246246
})
247247
})
248+
249+
it('should not throw a warning if all _phasediff.nii are associated with _magnitude1.nii', function(isdone) {
250+
var options = { ignoreNiftiHeaders: true }
251+
validate.BIDS(
252+
'tests/data/BIDS-examples-' + test_version + '/hcp_example_bids',
253+
options,
254+
function(issues) {
255+
assert.deepEqual(issues.errors, [])
256+
isdone()
257+
},
258+
)
259+
})
260+
261+
it('should throw a warning if there are _phasediff.nii without an associated _magnitude1.nii', function(isdone) {
262+
var options = { ignoreNiftiHeaders: true }
263+
validate.BIDS('tests/data/phasediff_without_magnitude1', options, function(
264+
issues,
265+
) {
266+
assert(issues.warnings.length == 2 && issues.warnings[1].code === '92')
267+
isdone()
268+
})
269+
})
248270
})
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"BIDSVersion": "1.0.0rc3",
3+
"Name": "7t_trt"
4+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
participant_id sex age_at_first_scan_years number_of_scans_before handedness
2+
sub-01 F 29 17 100

tests/data/phasediff_without_magnitude1/sub-01/ses-1/anat/sub-01_ses-1_T1map.nii.gz

Whitespace-only changes.

tests/data/phasediff_without_magnitude1/sub-01/ses-1/anat/sub-01_ses-1_T1w.nii.gz

Whitespace-only changes.

tests/data/phasediff_without_magnitude1/sub-01/ses-1/fmap/sub-01_ses-1_run-1_fieldmap.nii.gz

Whitespace-only changes.

tests/data/phasediff_without_magnitude1/sub-01/ses-1/fmap/sub-01_ses-1_run-1_magnitude2.nii.gz

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"EchoTime2": 0.00702,
3+
"EchoTime1": 0.006,
4+
"IntendedFor": "ses-1/func/sub-01_ses-1_task-rest_acq-fullbrain_run-1_bold.nii.gz"
5+
}

tests/data/phasediff_without_magnitude1/sub-01/ses-1/fmap/sub-01_ses-1_run-1_phasediff.nii.gz

Whitespace-only changes.

tests/data/phasediff_without_magnitude1/sub-01/ses-1/fmap/sub-01_ses-1_run-2_magnitude1.nii.gz

Whitespace-only changes.

0 commit comments

Comments
 (0)