We are having problems with importing events (triggers) from EDFs. We’ve tried different options like “Read events from channel…”.
Events are in channel 21 (called Annotations). When importing the EEG data, the rest of the 20 channels are properly imported but there’s no signal of channel 21. Events are with no doubt registered as we can see them in EEGLAB. Any idea of what the problem may be?
In the EDF/EDF+ files, the events are saved in the last channel of data called “EDF Annotations”. This channel contains text information and cannot be reviewed as a channel of data.
However, all the information it contains should be imported automatically when you review or import your file in the database. There is nothing else to do.
If you want to import the event from a file A into a file B, you have to link both to the database, open file A, save the events, open file B, import the events.
If you right-click on the subject > Review raw file, select your EDF file and then double-click on the “Link to raw file” to open it: you’re not seeing anything in the Event tab?
If you have some EDF files for which you can see more events in EEGLAB than in Brainstorm, please send it to me so I can have a look at it (dropbox or FTP).
I’ve fixed the problem with the incomplete annotations reading.
Update Brainstorm and you should see more events when you select the menu “Review raw file” (you have to delete the existing links and create them again)
It is a type of EDF Annotation that I had not tested before, I’m not sure if it contains all the information you need…
It contains only the “record” (a segment of 1 second) in which the events are, but not the exact time when they occur.
Example of an annotation in your file: "+46.0 Trigger 201"
While I would expect something like: "+46.0000 +46.1560 Trigger 201"
Therefore you have a time resolution of one second for your events, is it really what you are expecting?
I am having a similar problem with my EDF file in which the events do not import automatically. I have tried to read events from channel with the channel MKR4+ but the events do not match the triggers of the experiment.
I’ve encountered a similar issue when trying to read events from an EDF file. I’m doing everything through code, and after importing my EDF I can see the events and their timestamps correctly in the Brainstorm window. However, in the corresponding Brainstorm study file, the events variable appears empty.
In my case, the spikes are named after the channel where they occur. I tried reading all events whose name matches a channel name, building a list with their timestamps, and then importing that as an event structure, but nothing changes.
Is there a better or recommended way to read EDF events programmatically and obtain the same events folder that is normally created when importing the raw file into the database through the GUI?
Which variable?
If the EDF is added to review (it appears as Link to raw data), the events are in the F.events, not in Events.
This event folders appear when importing the epochs based on the events in the raw file.
Importing epochs from raw files based on the events in the raw data is done with the process process_import_data_event(), an example of its use is in the tutorial_introduction.m script:
If the option 'createcond' is 0, all the epochs are placed in the same folder.
If it is 1, a folder is created for each different event.
Okay, thank you! I could not find them.
In the function ‘process_import_data_event’ could I have ‘eventname’ be a list with the names that matches a channel name?
It is comma-separated list with the event names. Only event names that are already in the raw data are processed. If you want to know the events that are in the raw data, you can read them when the raw data is imported: