eeglabio.epochs.export_set#

eeglabio.epochs.export_set(fname, data, sfreq, events, tmin, tmax, ch_names, event_id=None, ch_locs=None, annotations=None, ref_channels='common', precision='single')#

Export epoch data to EEGLAB’s .set format.

Parameters:
fnamestr

Name of the export file.

datanumpy.ndarray, shape (n_epochs, n_channels, n_samples)

Data array containing epochs. Follows the same format as MNE Epochs’ data array.

sfreqint

sample frequency of data

eventsnumpy.ndarray, shape (n_events, 3)

Event array, the first column contains the event time in samples, the second column contains the value of the stim channel immediately before the event/step, and the third column contains the event id. Follows the same format as MNE’s event arrays.

tminfloat

Start time (seconds) before event.

tmaxfloat

End time (seconds) after event.

ch_nameslist of str

Channel names.

event_iddict

Names of conditions corresponding to event ids (last column of events). If None, event names will default to string versions of the event ids.

ch_locsnumpy.ndarray, shape (n_channels, 3)

Array containing channel locations in Cartesian coordinates (x, y, z)

annotationslist, shape (3, n_annotations)

List containing three annotation subarrays: first array (str) is description/name, second array (float) is onset (starting time in seconds), third array (float) is duration (in seconds) This roughly follows MNE’s Annotations structure.

ref_channelslist of str | str

The name(s) of the channel(s) used to construct the reference, ‘average’ for average reference, or ‘common’ (default) when there’s no specific reference set. Note that this parameter is only used to inform EEGLAB of the existing reference, this method will not reference the data for you.

precision“single” or “double”

Precision of the exported data (specifically EEG.data in EEGLAB)

See also

raw.export_set

Notes

Channel locations are expanded to the full EEGLAB format. For more details see utils.cart_to_eeglab_sph().