[Eeglablist] pop_writebva missing header info
Roy Cox
roycox.roycox at gmail.com
Wed Sep 23 05:00:14 PDT 2020
Hi Andreas,
Maybe one small follow-up:
The Brain Products specification indicates that when the optional fields
are left out, the channel info should look like this:
Ch1=Fp1,,,
That's three commas (separating four fields).
In my header created by pop_writebva it says:
Ch1=C3-M2,, %note that my channel name has the reference electrode as part
of its name, instead of Ch1=C3,M2,
But that's two commas.
I imagine any software expecting four substrings after "=" (sub1, sub2,
sub3, sub4) could run into trouble when there are only three (even when
substrings are allowed to be empty). Will have to check later but figured
I'd let you know.
Best,
Roy
On Wed, Sep 23, 2020 at 1:33 PM Roy Cox <roycox.roycox at gmail.com> wrote:
> hi Andreas,
>
> That clarifies things immensely: many thanks!
>
> Roy
>
> On Wed, Sep 23, 2020 at 12:21 PM Andreas Widmann <widmann at uni-leipzig.de>
> wrote:
>
>> Hi Roy,
>>
>> > I've been using pop_writebva to convert an eeglab struct to a
>> brainvision
>> > file. This works, and I can read it back in using pop_loadbv without
>> > problems.
>> >
>> > (Minor question: what's the difference between pop_loadbv and
>> pop_loadbva?)
>> pop_loadbv imports the „Brain Vision Data Exchange“ file format (vhdr +
>> vmrk + eeg; written by pop_writebva). pop_readbva imports MATLAB files
>> created by Brain Vision Analyzer (mat).
>>
>> > However, I noticed that other platforms complain about missing
>> resolution
>> > information in the header file, e.g., Fieldtrip:
>> >
>> > *Warning: unknown resolution (i.e. recording units) for channel 1 in *
>> > [filename]
>> >
>> > Looking at the header, this info is indeed missing:
>> By definition of the standard the resolution field may be empty (
>> https://urldefense.com/v3/__https://www.brainproducts.com/files/public/products/more/BrainVisionCoreDataFormat_1-0.pdf__;!!Mih3wA!TF5jKUgYuKtKhcQTj__9t1mcgcpX6D8XgFrnHIFAtNWX1ut3M3xhwlKUNPxc_CQIBdlS7w$ ).
>> Therefore, I would rather consider this as a bug in the Fieldtrip importer.
>>
>> > *[Channel Infos]; Each entry: Ch<Channel number>=<Name>,<Reference
>> channel
>> > name>,; <Resolution in microvolts>,<Future extensions..; Fields are
>> > delimited by commas, some fields might be omited (empty).; Commas in
>> > channel names are coded as " ".Ch1=C3-M2,, Ch2=C4-M1,, *
>> > *etc..*
>> >
>> > In case yet other software platforms deem this header information
>> > essential, how can I calculate/pass channel resolution into the header?
>> Try changing line 94 on pop_writebva.m
>> from
>> fprintf(fid1, 'Ch%d=%s,, \n', index, EEG.chanlocs(index).labels);
>> to
>> fprintf(fid1, 'Ch%d=%s,,1\n', index, EEG.chanlocs(index).labels);
>>
>> Hope this helps! Best,
>> Andreas
>
>
More information about the eeglablist
mailing list