Add more checks in validator.js, put adequate tests into test_validator.js ... and then add these checks to the validateBrainVision function in index.js.
Some ideas:
[x] check if file size of .eeg, .vmrk, .vhdr is adequately big
[x] estimate filesize of .eeg using SamplingInterval and nChannels
[x] check if files are readable
[x] check if all mandatory sections are present, such as [Binary Infos], [Common Infos], ...
[x] within the mandatory sections are all non-default fields present? Such as SamplingInterval
[x] check the first line of vhdr: is it the header? --> which version of BrainVision format?
[x] check that links (file pointers) are relative and do not contain idiosyncratic paths because that will make copying the files troublesome (e.g., not /home/stefan/Desktop/test.vhdr but simply test.vhdr)
the more sensible checks, the merrier.
Better to make them fine-grained, so that meaningful issue messages can be pushed in index.js
Add more checks in
validator.js
, put adequate tests intotest_validator.js
... and then add these checks to thevalidateBrainVision
function inindex.js
.Some ideas:
.eeg, .vmrk, .vhdr
is adequately bigSamplingInterval
andnChannels
[Binary Infos]
,[Common Infos]
, ...SamplingInterval
/home/stefan/Desktop/test.vhdr
but simplytest.vhdr
)the more sensible checks, the merrier.
Better to make them fine-grained, so that meaningful
issue
messages can be pushed inindex.js