Reading and merging events from seperate files with raw data

  • MNE version: e.g. 0.24.1
  • env - google colab

Hi everyone,
I am working with an EEG data which is available here. This folder has three different files which contains EEG data, Events and timestamp. I am able to read EEG data using

data = mne.io.read_raw_edf(file, preload=True)
But when I am trying to read events I am getting error something like this

ValueError: could not convert string to float: 'Latency

I am using the following code to read events and then add to raw data which has been suggested here.

info = mne.create_info([‘STI’], data.info[‘sfreq’], [‘stim’])

stim_raw = mne.read_events(‘/content/gdrive/MyDrive/EEG_Data/brainwave-authentication-main/Dataset/Dataset/studie001_2019.05.08_10.15.34-events.txt’, info)

data.add_channels([stim_raw], force_update_info=True)

I also tried another method which been mentioned here. But I am getting error while reading the data.
Please, can anyone suggest how can I read the raw data and add events to it.
Sorry if this question appears to be naive, as I am very new to brain signals. Any help or suggestion would be highly appreciated.

I suspect the EDF files are not proper EDF files. You should see if other packages eg PyEDF, PyEDFlib, edfbrowser manage to load them. If not the files are really broken

Alex

Thanks for the reply, I am able to read these .edf files using MNE and then with some python I am able to filter out each of the events separately, but it’s taking enormous amount of time. I really wish if anyone could suggest a way to do the same with MNE.