BUG: Reading EDF files can be very slow
See original GitHub issueI am trying to read an EDF file, but the .read_data() (edit, i mean load_data()
) function fails. Same thing happens with this sample file from here
Looking a bit into the code I find that there is a call to _read_segment_file
in io\base.py
which raises an NotImplementedError
. The Problem seems to be the call itself, it doesn’t even get to the called functions inside. If I comment the call out, it works fine.
self._read_segment_file(data[:, this_sl], idx, fi,
int(start_file), int(stop_file),
cals, mult)
Strangely enough running the sample file from the EDF-API works without problems
I hope I provided all the info needed. Unfortunately I’m not very experienced in debugging functions or classes. Thanks!
Platform: Windows-10-10.0.14393-SP0
Python: 3.5.2 (same in 2.7.x) (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]
Executable: C:\Program Files\WinPython-3.5\python-3.5.2.amd64\pythonw.exe
mne: 0.14.dev0
numpy: 1.11.2 {lapack=C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/include, blas=C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/include}
scipy: 0.18.1
matplotlib: 1.5.3
sklearn: 0.18
nibabel: Not found
nitime: Not found
mayavi: Not found
nose: 1.3.7
pandas: 0.19.1
pycuda: Not found
skcuda: Not found
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Reading brainstorm exported raw data in mne
I tested the export of the EEG/Epilepsy tutorial dataset to EDF+ with Brainstorm. It's very slow, but the .edf file generated is read...
Read more >The Sleep-EDF Database - PhysioNet
Applications using WFDB library version 10.4.5 or later can read EDF files directly with no conversion required. The recordings were obtained from Caucasian ......
Read more >How to read edf data in Python 3 - Stack Overflow
I want to analyze data of a edf file, but I cannot read it using pyEDFlib. It threw the error OSError: The file...
Read more >EDF downloads - European Data Format
This page aims to list all freely available EDF(+) files and software, including ours. Your contribution, too, will be very much appreciated.
Read more >Bug 653 – High memory consumption for readedf.m
We usually use the function sopen and sread from BIOSIG to read EDF files. These functions are not memory efficient either. If you...
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
It probably has to do with inefficiencies in how we loop. Different channel/sample configurations will expose those weaknesses differently. Or your other file could require different processing, e.g. resampling if not all channels have the same sample rate, which can be slow.
Yikes. That doesn’t seem right. Which file are you testing with?
Perhaps there is some optimization we can do. I’ll re-title the issue.