eeg_eeg2mne#

eeg_eeg2mne(EEG)#

Convert an EEG dataset to an MNE Raw or Epochs object.

Continuous data becomes Raw. Epoched data becomes Epochs. EEG['subject'] is stored as info['subject_info']['his_id']. Events whose onset falls in [xmin, xmax + 1/srate) are kept with the time-locking event. event['duration'] values, in samples, become annotation durations in seconds. On the way back, every event includes duration when any duration is nonzero, and a zero duration is 0.

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#

EEGdict

EEG data structure.

Returns#

mne.io.BaseRaw | mne.BaseEpochs

MNE object for the dataset.

Raises#

ValueError

If an epoch has no events. The message names that epoch, 1-based.