Skip to content
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

EDF Annotation import issue #93

Closed
happymuzi opened this issue Dec 3, 2019 · 10 comments
Closed

EDF Annotation import issue #93

happymuzi opened this issue Dec 3, 2019 · 10 comments

Comments

@happymuzi
Copy link

happymuzi commented Dec 3, 2019

Description

Hello there!

When using pop_biosig function in EEGLAB v2019.1 to import edf files, the following warning showed up: "Warning: EDFANNOT2EVT.M is currently not supported! If there are problems reading EDF files, download and install mexSLOAD.mex* from https://pub.ist.ac.at/~schloegl/src/mexbiosig/".

While the EEG data imported were correct, EEG.event.type only have one value [1]. When trying the development version, EEG.event.type also have one value only which was the value of the first event, and the same warning still popped up.

MATLAB is running R2018b and here is the link to a sample file.

Any ideas on how to solve this would be greatly appreciated.


#### Steps to Reproduce
  1. EEG = pop_biosig(file);
  2. EEG.event(:).type

#### Expected behavior: EEG.event(:).type should be different.
#### Actual behavior: EEG.event(:).type were the same.
#### Versions
OS version Windows 10
Matlab version R2018b
EEGLAB version EEGLAB v2019.1
@arnodelorme
Copy link
Collaborator

With the development version on Github (which has several fixes - simply download zip on Github), importing your file, I have one event of type 'Started Recording' so event annotation are supported. I am not sure about the message from BIOSIG (which is a BIOSIG issue). Let us know if the problem persist.

@happymuzi
Copy link
Author

Thanks for the reply. I tried the development version back when I posted this issue. The file I shared should yield at least two different event types, but in reality, EEGLAB can only find one event type. I will try the newest development version to see if this is fixed. Judging from your reply, the issue probably is still there.

@arnodelorme
Copy link
Collaborator

I have looked at what sopen returns and there is definitely only one event type. What software did you used to see 2 event types?

@happymuzi
Copy link
Author

The sample file is converted to the EDF file from the original recording acquired by Sirenia (Pinnacle Tech). I examined the annotation in EDFbrowser, and it matched the original file. Here is the link to a screenshot.

@arnodelorme
Copy link
Collaborator

Yes, there is definitely an issue as sopen assumes all events are of the first type while they are indeed of different types.

@arnodelorme
Copy link
Collaborator

I have notified Alois Schlogl, the author of BIOSIG.

@happymuzi
Copy link
Author

Thank you!

@mantour
Copy link

mantour commented Mar 21, 2020

I had the same problem. I made a small modification to edfannot2evt.m and biosig2eeglabevent.m to solve it. Hope it will also work for other people.

fix_edf_annotation.zip

@mantour
Copy link

mantour commented Apr 6, 2020

I fixed a bug in my previous solution.
edfannot2evt.zip

@RaiyaN-98
Copy link

This has happened due to this command TYP(N, 1) = 1 in edfannot2evt.m (Marked yellow in the attached image). So the event type is marking as 1 all the time. (EEGLAB v2021.0)
image
Though I haven't found any generalized solution. But for my data there were 3 events - T0, T1, T2. So I made a change in the edfannot2evt.m file to find out different event_num. And then assign TYP(N, 1) = event_num. It worked for me!
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants