Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepencies with imported files compared to Brain vision #5

Open
arnodelorme opened this issue Nov 22, 2019 · 4 comments
Open

Discrepencies with imported files compared to Brain vision #5

arnodelorme opened this issue Nov 22, 2019 · 4 comments

Comments

@arnodelorme
Copy link
Collaborator

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

@bknakker
Copy link

bknakker commented Aug 9, 2021

Regarding point 4, I have a working version where I import the segment date/time information as a MATLAB datetime object. I'd be happy to file a pull request but I'm not sure whether MATLAB datetime would be the right solution here, as I'm afraid it would be incompatible with older MATLAB versions, Octave, etc. Is there a policy on how EEGLAB should handle date/time information? It would be nice if I could modify my code to a "pullable" solution.

@arnodelorme
Copy link
Collaborator Author

arnodelorme commented Aug 9, 2021 via email

@cmaidhof
Copy link

cmaidhof commented Aug 1, 2024

@bknakker, do you also have by any chance a version where the bvtime field is written during export from eeglab back to bv format?
I guess that makes sense though only when there has been no data deleted in the beginning of a recording...
It would be great if the bvtime info could "survive" import and export.

@bknakker
Copy link

bknakker commented Aug 1, 2024

@bknakker, do you also have by any chance a version where the bvtime field is written during export from eeglab back to bv format? I guess that makes sense though only when there has been no data deleted in the beginning of a recording... It would be great if the bvtime info could "survive" import and export.
@cmaidhof, I did not work with the writing functions. (Also unfortunately I only made an in-house version for myself that reads bvtime, but shamefully I did not go on to produce a version that meets policies/requirements and would be mergeable.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants