Giter VIP home page Giter VIP logo

bva-io's Introduction

This repository is a plugin for EEGLAB to import/export Brain Vision Analyzer EEG data files.

Version history

v1.73 - Writing data now in MULTIPLEXED format as a new option; show warning when VMRK file is missing

v1.72 - Avoid crashing when event file is absent

v1.71 - Allow to import .ahdr files

v1.7 - Better handling of VMRK and EEG file non-consistant witht the header VHDR file; allow empty marker info section; allow importing truncated binary file

bva-io's People

Contributors

arnodelorme avatar jdkoen avatar lychfindel avatar widmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bva-io's Issues

Discrepencies with imported files compared to Brain vision

I’ve noticed some small deviations when I compare the output of pop_writebva with original brainvision data.

  1. There is an additional marker in the beginning: “Mk1=Time 0,,1,0,0,0". This results in a different numbering of markers, and in the writebva output there is one marker more than in the original data

  2. the differentiation between "Stimulus" and "Response" markers is lost in the export, even though this information is preserved in the EEG.event structure. Replacing line 132
    EEG.event(index).type = 'Stimulus';
    with
    EEG.event(index).type = EEG.event(index).code;
    seems to fix this.

  3. very very minor:
    "\1" is not correctly written into the output file, but an additional \ in line 126 should fix that (\1)

  4. is there any way to preserve the date information stored with the first New Segment marker?
    Mk2=New Segment,,1,0,0,0 % output from write_bva
    Mk1=New Segment,,1,1,0,20170816200208360070 % line from original vmrk file
    I guess this is related to the EEG.bvtime field. But since I get there a negative number, I'm not sure how exactly it works.
    Usually I wouldn't care about that, but if you have synchronous video, this is a useful piece of information.

Many thanks and best regards,
Clemens

Channel location file

See attached file. The code snippet below allow to read electrodes

xDoc = xmlread('elettrodi_benedetta.bvef');
allListItems = xDoc.getElementsByTagName('Electrode')
allListItems.getLength

See the function xmlread for how to decode the rest of the file, and write an importer compatible with EEG.chanlocs

BV data in int_32 format?

Exported epoched data from BV-Analyzer and would like to read them in with pop_loadbv.
But exported data is in int 32-bit format, which is not supported by pop_loadbv.

[Binary Infos]
BinaryFormat=INT_32
UseBigEndianOrder=NO

Any solution for this? I did not see an option to change export bit range in BVA or to export as float-32.
Any input appreciated.

Issue with event markers

Description
I'm attempting to import a .vhdr file produced by Brain Vision Analyzer 2. The process fails with error:

EEGLAB error in function parsebvmrk() at line 40:

Operands to || and && operators must be convertible to logical scalar values.

Steps to Reproduce
The data I'm using is from https://osf.io/rmuje/. I can upload one of the files but they're quite big (49,000 K).

Outside EEGLab:

1, Download the EEG1 file from OSF
2. Unzip the file
3. Go to .\EEG1\EEG1\35\export
4. Remove the "_" symbols from between "Pulse" and "Artifact" and "Correction" (I think this might be due to WinRAR adding them?)

Inside EEGLAB:

File > Import data > .. > From Brain Vis Rec vhdr file
Select the vhdr file from .\EEG1\EEG1\35\export
Click OK (I've tried changing the interval and channels, but same error)
Error
Expected behavior:
The data should load.

Actual behavior:
It doesn't load.

can't convert xdf to bvef

I am using the latest version of Matlab (2019b) and eeglab (v2019.1). I load an xdf into eeglab using the official xdf importer. The file contains EEG and markers. I try to export as bvef using this tool and receive the following error:
bva_fail

This happens with any xdf data that I try to convert.

Potential data precision problem

I noticed that an exported BV marker file with bva-io has a bug in Mk1 as follows:

Mk1=New Segment,,1,8.111800e+04,0,0

This prevents BVA-IO to re-load it again (and could have caused some other troubles elsewhere...)This is probably because of resampling which changes the data starting point (this is an old bug which has been causing several other bugs, isn't it?)

My solution was to overwrite 8.111800e+04 with 0. I confirmed that the modified marker file was recognized fine and could be imported by BVA-IO.

Makoto

Readme.md

We should have a simple readme file outlining capabilities and indicating version changes and bug fixes.

An attempt to import data exported using BVA-IO to FASST (SPM8 plugin)

I'm not sure how many users would be interested in this specific topic, but if there is ever someone interested in exporting EEGLAB data to FASST(SPM8 plugin) to test its constraint ICA, I want to raise a caution that EEGLAB-exported BV format data loaded by crc-eeg_rdata is interchanged with their rows and colums! So s/he should do something like this:

data = reshape(data, [size(data,2) size(data,1)]);

I'm not sure if this could cause a problem in any other places... for example, compatibility with Vision Analyzer (which I can't test since I don't have it now).

Makoto

pop_writebva : multiplexed orientation

Hey,

I would like to know if it could be possible to upgrade pop_writebva to export data into multiplexed orientation, please. Currently the function converts only data into vectorized orientation whereas BVA doesn't use this data orientation anymore.

It would be very helpful.

Regards,

Emmanuelle

event loss after writing with pop_writebva

The original bug is available here. It contains data files available for download.

Hi,

I am importing concatenated .whdr files from BrainVision analyser using EEGlab.
When I use pop_writebva to write files back to disk events are missing.
I have checked against the raw files, the events which are missing are those occurring on the boundary between concatenated blocks.

Thank you in advance,
Nicolas

bvaio pop_writebva error: Unrecognized field name "nbchan"

Hello!

I have a problem with exporting EEG data from Eeglab to Brainvision Analyzer (via bvaio).

It works fine to load existing datasets (also the whole database).
However, I can only export one file at a time (manually by clicking on file - - > export - - > Write Brain Vis. exchange format file in Eeglab)

I copied the history file of this operation and tried to apply it to all files:

EEG.etc.eeglabvers = '2021.1'; % this tracks which version of EEGLAB is being used, you may ignore it
EEG = eeg_checkset( EEG );
EEG = eeg_checkset( EEG );
EEG = eeg_checkset( EEG );
EEG = eeg_checkset( EEG );
EEG = eeg_checkset( EEG );
EEG = eeg_checkset( EEG );
EEG.etc.eeglabvers = '2022.0'; % this tracks which version of EEGLAB is being used, you may ignore it
EEG = eeg_checkset( EEG );
pop_writebva(EEG,'E:\folder\allfiles(datafile).name');

I always get this error:

Unrecognized field name "nbchan".

Error in pop_writebva (line 94)
for index = 1:EEG.nbchan

Line 94 looks like this (it's the 3rd line here)

% write data
% ----------
for index = 1:EEG.nbchan
fwrite(fid3, EEG.data(index,:), 'float' );
end;

What could be the problem, and how can I solve it other than having to export all 580 files separately?

Thank you!
Valerie

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.