eeg_mne2eeg_epochs#

eeg_mne2eeg_epochs(epochs, ica)#

Convert MNE epochs with ICA to an EEG dataset.

The time-locking event of each epoch is placed at time 0. Other events whose onset falls in [tmin, tmax + 1/srate) are included. eeg_checkset builds EEG['epoch']. Annotation durations are stored on event['duration'] in samples. When any duration is nonzero, every event has that field, and a zero duration is 0. An integer type is restored only when str(int(text)) reproduces the text, and a float only when str(float(text)) does, so '2.50' stays text. info['subject_info']['his_id'] is copied to EEG['subject'].

The urevent table and event['urevent'] do not survive. Boolean, non-finite, and non-scalar event fields do not survive. Annotation fields onset, description, ch_names, and hed_string cannot be stored as extra event fields. Recordings with no durations omit the field.

Parameters#

epochsmne.Epochs

MNE epochs object.

icamne.preprocessing.ICA

MNE ICA object.

Returns#

dict

EEG dataset dictionary.