Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (16.4k points)

I don't know how to read edf data using python? Can anyone tell me how to analyze the data of edf file? I cannot able to read data using pyEDFlib. I get an error saying, OSError: The file is discontinuous and cannot be read. I don't know why I'm getting this error.

1 Answer

0 votes
by (26.4k points)

Try using MNE library. Try the below code:

import mne

file = "my_path\\my_file.edf"

data = mne.io.read_raw_edf(file)

raw_data = data.get_data()

# you can get the metadata included in the file and a list of all channels:

info = data.info

channels = data.ch_names

Want to become a expert in python? Join python course fast!!

For more details, do check out...

31k questions

32.9k answers

507 comments

693 users

...