mne.io.read_raw_eeglab

mne.io.read_raw_eeglab(input_fname, montage=None, eog=(), event_id=None, event_id_func=’strip_to_integer’, preload=False, verbose=None, uint16_codec=None)[source]

Read an EEGLAB .set file.

Parameters:

input_fname : str

Path to the .set file. If the data is stored in a separate .fdt file, it is expected to be in the same folder as the .set file.

montage : str | 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.

eog : list | tuple | ‘auto’

Names or indices of channels that should be designated EOG channels. If ‘auto’, the channel names containing EOG or EYE are used. Defaults to empty tuple.

event_id : dict | None

The ids of the events to consider. If None (default), an empty dict is used and event_id_func (see below) is called on every event value. If dict, the keys will be mapped to trigger values on the stimulus channel and only keys not in event_id will be handled by event_id_func. Keys are case-sensitive. Example:

{'SyncStatus': 1; 'Pulse Artifact': 3}

event_id_func : None | str | callable

What to do for events not found in event_id. Must take one str argument and return an int. If string, must be ‘strip-to-integer’, in which case it defaults to stripping event codes such as “D128” or “S 1” of their non-integer parts and returns the integer. If the event is not in the event_id and calling event_id_func on it results in a TypeError (e.g. if event_id_func is None) or a ValueError, the event is dropped.

preload : bool or str (default False)

Preload data into memory for data manipulation and faster indexing. If True, the data will be preloaded into memory (fast, 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, requires less memory). Note that preload=False will be effective only if the data is stored in a separate binary file.

verbose : bool | str | int | None

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

uint16_codec : str | None

If your *.set file contains non-ascii characters, sometimes reading it may fail and give rise to error message stating that “buffer is too small”. uint16_codec allows to specify what codec (for example: ‘latin1’ or ‘utf-8’) should be used when reading character arrays and can therefore help you solve this problem.

Returns:

raw : Instance of RawEEGLAB

A Raw object containing EEGLAB .set data.

See also

mne.io.Raw
Documentation of attribute and methods.

Notes

New in version 0.11.0.