[Eeglablist] pop_writebva missing header info

Roy Cox roycox.roycox at gmail.com
Wed Sep 23 04:33:07 PDT 2020


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!QqQYeBeSMnf5yC0CsRfU974NfPL_A9F4E56mDXR06JR0rbH5Z5UOsZsj6Dm3uU8n6n80PQ$ ).
> 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