-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
GDF file reader #2136
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
GDF file reader #2136
Conversation
|
hey @alexandrebarachant. this looks good so far, thanks for the contribution! we will probably need to work out the logistics of merging this with the edf/bdf module because it will help reduce the code overlap by a lot. once this is stable we can do the incorporation. we will also need to wait until #2127 is merged because it will refactor a lot of the way we do reading across modules. |
|
I will be able to test the code more intensively in the next days, and if i found other sources of gdf file, i'm willing to extend the support. |
|
some Graz data from the BCI competition is in GDF format: |
|
@alexandrebarachant #2127 has been merged. If you want, I can help take a look at unifying your GDF with the EDF/BDF module when the code is stable. |
|
@alexandrebarachant can you bring this PR back to life after a rebase on master? might be painful... |
|
yep, in a couple of days, i will have time to finish this (+ the XDawn PR). i plan to merge this with the new EDF code. I used the gdf reader for some time now and i did'n spot any major bug. |
|
sounds good. I see that you still have time to play on kaggle ;)
|
|
@agramfort I'm closing this one and opening a new one on a fresh new branch. |
|
Hello, has gdf support ever been implemented ? I can't find any trace of it in the latest code... |
|
no it still needs to be completed |
|
Ok no problem! @alexandrebarachant do you think your code is anywhere near useable as is? or should I rather look elsewhere? I don't mind looking under the hood to see if I'm able to patch things up... |
|
I think you can use my branch https://github.com/alexandrebarachant/mne-python/tree/gdf The current reason i'm not pushing this further is that the gdf code has a lot of overlap with the edf code, and that it must be factorized before being integrated to mne. I just don't have the bandwidth to work on this and it is low priority for me (i don't use GDF anymore). But i will be more than happy if you can take the lead on that. |
|
Cool! I can give it a try. I'm still very much a python noob so no guarantees, but if I ever get anywhere with this, what's the proper way to take the code in your Or should I make a PR directly to |
|
If the code is still working, or working with minimal modification, the best would be to create your own PR with your own branch. GDF as a lot of overlap with EDF/BDF. most of the meta data are stored the same way, the main difference is that GDF is more flexible on the datatype used to store binary EEG data. you might want to see how you can actually merge my code from gdf.py into edf.py |
|
OK, thanks for the info. I checked out your code and it doesn't run on my gdf files (at least not natively). I'm going to look into this first and see how much of your code I need to change before possibly merging it into edf.py |
This is code for reading GDF files (http://arxiv.org/abs/cs/0608052)
This file format is commonly use in the BCI community, and is supported by the biosig toolbox.
There is a biosig python package, but it rely on the c++ implementation and its compilation is a bit tricky on some OS. So i made a pure python implementation, inspired by an old python-biosig code and the EDF raw reader of MNE (There is a lot of overlap between EDF and GDF).
The code support only GDF file version < 1.9 . I only have GDF files generated by openvibe (GDF version 1.25), and i could not find more recent files to extend the support.
I provided tests and data samples (the smallest file i can find is 4.5Mb). It works fine on my data.