mne.io.read_raw_edf

mne.io.read_raw_edf(input_fname, montage=None, eog=None, misc=None, stim_channel='auto', exclude=(), preload=False, verbose=None)[source]

Reader function for EDF or EDF+ files.

Parameters
input_fnamestr

Path to the EDF or EDF+ file.

montagestr | None | instance of Montage

Path or instance of montage containing electrode positions. If None, sensor locations are (0,0,0). See the documentation of mne.channels.read_montage() for more information.

eoglist or tuple

Names of channels or list of indices that should be designated EOG channels. Values should correspond to the electrodes in the file. Default is None.

misclist or tuple

Names of channels or list of indices that should be designated MISC channels. Values should correspond to the electrodes in the file. Default is None.

stim_channel‘auto’ | str | list of str | int | list of int

Defaults to ‘auto’, which means that channels named ‘status’ or ‘trigger’ (case insensitive) are set to STIM. If str (or list of str), all channels matching the name(s) are set to STIM. If int (or list of ints), channels corresponding to the indices are set to STIM.

Warning

0.18 does not allow for stim channel synthesis from TAL channels called ‘EDF Annotations’ anymore. Instead, TAL channels are parsed and extracted annotations are stored in raw.annotations. Use mne.events_from_annotations() to obtain events from these annotations.

excludelist of str

Channel names to exclude. This can help when reading data with different sampling rates to avoid unnecessary resampling.

preloadbool or str (default False)

Preload data into memory for data manipulation and faster indexing. If True, data will be preloaded into memory (fast, but requires large amount of memory). If preload is a string, preload is the file name of a memory-mapped file which is used to store the data on the hard drive (slower, but requires less memory).

verbosebool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

See also

mne.io.read_raw_bdf

Reader function for BDF files.

mne.io.read_raw_gdf

Reader function for GDF files.

Notes

It is worth noting that in some special cases, it may be necessary to shift event values in order to retrieve correct event triggers. This depends on the triggering device used to perform the synchronization. For instance, in some files events need to be shifted by 8 bits:

>>> events[:, 2] >>= 8  # doctest:+SKIP

TAL channels called ‘EDF Annotations’ are parsed and extracted annotations are stored in raw.annotations. Use mne.events_from_annotations() to obtain events from these annotations.

If channels named ‘status’ or ‘trigger’ are present, they are considered as STIM channels by default. Use func:mne.find_events to parse events encoded in such analog stim channels.