Export to EDF using pyEDFLib
See original GitHub issueProblem Right now it is only possible to export data using FIF, which is not a very useful and widely used file format. I do remember seing an issue about integration of some EDF library, but at this point I can’t find it again.
Suggestion I’d like to make a first, basic addition to integrate pyEDFlib for writing EDF+ files to disk. I’m using this library since some time and have good experience with it.
However I have a few questions regarding the approach:
- Would it be okay to use an external library for saving EDF instead of re-inventing the wheel?
- Where should I insert the code? I thought to extend
BaseRawwith a functionsave_edf(), however it would also be possible to alter.save()to accept different file types - in the basic version, this would save channels (and annotations?) only as raw as they are. I have no experience with all the Evoked, Epoched, etc. and if we could save them appropriately via EDF.
Alternatives Write a native EDF-writer, which at this point I do not have the time for.
edit: I’ve created a gist as requested here: https://gist.github.com/skjerns/bc660ef59dca0dbd53f00ed38c42f6be
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (5 by maintainers)
Top Results From Across the Web
PyEDFlib -EDF/BDF Toolbox in Python — PyEDFlib ...
PyEDFlib is a free Open Source wavelet toolbox for reading / writing EDF/EDF+/BDF files. import pyedflib import numpy as np file_name = ...
Read more >How to export a rawEDF file to my computer - Stack Overflow
so basically I am manipulating edf files using mne and pyedflib libraries in python. As long as I am applying many changes on...
Read more >PyEDFlib Documentation - Read the Docs
PyEDFlib is a Python library to read/write EDF/EDF+/BDF files based on EDFlib. ... The EDF/EDF+ format saves all data with 16 Bit.
Read more >pyedflib is a python library to read/write EDF+/BDF+ files ...
I'd like to do that if it's at all practical. Also, the byte-order issues seem to be in edflib. My quick research suggests...
Read more >EDF+ / Annotations / Most are missing when importing the .edf ...
Signal comes through fine. We're using eego recording software (from ant-neuro) for exporting the recorded signal to .edf and I think ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
2 reactions:
@holgern @robertoostenveld (author of pyedf) and anyone interested in this should team up so there is one reference implementation of EDF files in Python
pyEDFlib has a dependency on cython so it’s not an option to use this in mne. Packaging compiled code is too much work.
I would support adding an entry in the MNE doc to document how to write edf+ files with mne. You could put a link to a gist you use.
Closing since this was fixed in #5777, but if a pure-Python solution emerges in the future, feel free to open a new issue.