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

iEEG specification for BrainVision format #172

Closed
JegouA opened this issue Mar 8, 2019 · 12 comments · Fixed by #175
Closed

iEEG specification for BrainVision format #172

JegouA opened this issue Mar 8, 2019 · 12 comments · Fixed by #175
Labels
EEG Electroencephalography iEEG

Comments

@JegouA
Copy link
Contributor

JegouA commented Mar 8, 2019

In the iEEG specification, BrainVision is one format accepted but the chosen extensions are only .eeg, .vhdr, and .vmrk. However, in this format, it is possible to save the data with the extensions .dat, .vhdr, and .vmrk.
I asked BrainProduct and they said there is no difference between .eeg and .dat.
Is it possible to add .dat as an acceptable extension for BrainVision format?
@choldgraf @dorahermes @ftadel

@sappelhoff
Copy link
Member

sappelhoff commented Mar 8, 2019

Hi @JegouA, thanks for reporting! Could you please specify under which circumstances you obtain a .dat file?

Furthermore, if there is no difference between .dat and .eeg, perhaps a quick fix for now would be to simply rename the files? See for example these tools:

  1. Matlab: https://gist.github.com/CPernet/e037df46e064ca83a49fb4c595d4566a
  2. Python: https://mne-tools.github.io/mne-bids/auto_examples/rename_brainvision_files.html#sphx-glr-auto-examples-rename-brainvision-files-py
  3. You can also ask BrainProducts for their proprietary renaming tool for a GUI approach

EDIT

I realized that all of these tools only rename the filenames, not the extensions. So one would either have to:

  • write a new tool
  • or use BrainVision analyzer for importing the .dat data and then exporting as .eeg, as seems possible according to @JegouA's comment

A tool would be easily programmed, as only two things need to be changed for a given BrainVision file triplet to have a .eeg extension instead of a .dat one:

  1. <filename>.dat rename to <filename>.eeg
  2. Within <filename>.vhdr and <filename>.vmrk change the line DataFile=<filename>.dat to DataFile=<filename>.eeg

@JegouA
Copy link
Contributor Author

JegouA commented Mar 8, 2019

While we converted our data to BrainVision format, we converted the data in .dat, .vhdr, .vmrk. BrainVision Analyzer offered to export the data in this format and BrainProduct team said: "The internal format of the data file is not depending on which of the two extensions are used". So, from my point of view, BrainVision format is .vhdr, .vmrk, .eeg and .vhdr, .vmrk, .dat. To be fair, both formats should be accepted because BrainVision is not only one format.

@sappelhoff
Copy link
Member

What was the original format of your data? Does BrainVision analyzer give you the choice to export either as .dat or as .eeg?

To be fair, both formats should be accepted because BrainVision is not only one format.

sure that is always an option ... let's look for a parsimonious solution before adding to the specification though! :-)

@olivierjmdavid
Copy link

Hi, I agree that we should have the possibility to upload either .eeg or .dat for BrainVision format
Best
Olivier

@sappelhoff sappelhoff added iEEG EEG Electroencephalography labels Mar 8, 2019
@JegouA
Copy link
Contributor Author

JegouA commented Mar 8, 2019

BrainVision gives the choice to export in .eeg and in .dat. We have different original formats.

@choldgraf
Copy link
Collaborator

Thanks for bringing this up @JegouA !

I think the question here is: how difficult is it to either 1. Export from the GUI into .eeg instead, or 2. Rename the file name from .dat to .eeg as a quick final step for the BIDS data structure?

I think the reason for trying to nail this down is that we don't want the specification to grow unnecessarily if it doesn't need to. Each individual growth (e.g. support ".dat" and ".eeg" instead of ".eeg") is relatively small, but put together this makes the specification harder to maintain and keep track of (e.g. .dat is a fairly generic file extension, so I could see this generating some confusion for people). I agree with @sappelhoff 's intuition that we should make sure there's really a tangible benefit to allowing either .dat or .eeg

@sappelhoff
Copy link
Member

Thanks for chiming in @choldgraf :-)

two more notes from me:

  1. I updated my original answer regarding existing tools, please see: iEEG specification for BrainVision format #172 (comment)
  2. We accepted the BrainVision data format with the CORE specification in mind. That one mentions only .eeg actually 🤔 ... see spec ...then again they do have an example with .dat in the pdf, so we should alert them to this inconsistency

@JegouA
Copy link
Contributor Author

JegouA commented Mar 11, 2019

Hello,
I am in contact with BrainProducts, they are working on the format specification.
They should come back with more information in the week.
Thank you

@JegouA
Copy link
Contributor Author

JegouA commented Mar 11, 2019

Hello,
BrainProducts gave me more information about the format specification.
The format used by BIDS is named "BrainVision Core file format" and it's .eeg, .vhdr, and .vmrk. (no .dat)
They agree that the supported raw file format shall remain binary .eeg. They are correcting the specifications (pdf).
I also suggest adding "BrainVision Core file format" in BIDS-iEEG/EEG specifications to avoid future confusion because BrainProducts confirmed there are several versions of BrainVision format.

I will change the extension of my data as well as the data file name in .vhdr.
Thank you all for your comments.

@sappelhoff
Copy link
Member

I also suggest adding "BrainVision Core file format" in BIDS-iEEG/EEG specifications to avoid future confusion because BrainProducts confirmed there are several versions of BrainVision form

thanks a lot for clarifying @JegouA. I agree that this should be added in the iEEG / EEG specification text explicitly. Would you like to make a Pull request?

@JegouA
Copy link
Contributor Author

JegouA commented Mar 12, 2019

I would like to but I don't know how to do a pull request @sappelhoff

@sappelhoff
Copy link
Member

sorry @JegouA ... I just saw your comment now. I would have linked you to this page for a brief description: https://github.com/bids-standard/bids-specification/blob/master/CONTRIBUTING.md#making-a-change-with-a-pull-request

... but you seem to have figured it out on your own.

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

Successfully merging a pull request may close this issue.

4 participants