[Mne_analysis] BDF file with triggers in Annotations

Johan Wessberg johan.wessberg at gu.se
Thu Sep 15 09:34:36 EDT 2016
Search archives:

Hi,

We’re trying to import BDF (or EDF) files where the triggers are in the Annotations in the header (standard for the EDF/BDF format). We can import the file to MATLAB using the Biosig toolbox, and the trigger information is there. The problem is how to import this file, including the triggers, to MNE.


The I/O section in the MNE manual provides the following information (see under ’European data format (.edf)’):

”The EDF+ files may contain an annotation channel which can be used to store trigger information. The Time-stamped Annotation Lists (TALs) on the annotation data can be converted to a trigger channel (STI 014) using an annotation map file which associates an annotation label with a number on the trigger channel.”
http://martinos.org/mne/dev/manual/io.html

The problem is that we cannot find any information on the supposed format of the ”annotation map file”!
 
Using mne.io.read_raw_edf() without the Annotations information provides us with all of the data channels, and an empty stim channel (all zeros). Again, we know that the Annotations are there, they are just not converted properly. This is not surprising, since we are supposed to provide ’annot’ and ’annotmap’ arguments to mne.io.read_raw_edf().



There was a bit of a discussion on importing BDF triggers back in June (June 5-6 2016, with a follow-up on June 13). The question started out as my question, however, the discussion quickly moved on from Annotations to masking the already read triggers so that mne.find_events() could make sense of the stim channel to make proper triggers. Clearly, this person had already solved the first problem and already had been able to import the data in the BDF file into a proper stim type channel in the data array. 


I should say that we usually work with FIF files from an Elekta Neuromag Triux. The BDF file import is for another application.

Any help is greatly appreciated!


Johan Wessberg
Professor
University of Gothenburg
Institute of Neuroscience and Physiology
Goteborg, Sweden





More information about the Mne_analysis mailing list