eeg_mne2eeg#

eeg_mne2eeg(raw)#

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

info['subject_info']['his_id'] is copied to EEG['subject']. For epochs, the time-locking event is placed at time 0 and other events whose onset falls in [xmin, xmax + 1/srate) are kept. eeg_checkset builds EEG['epoch']. Annotation durations are stored on event['duration'] in samples (seconds times srate). When any duration is nonzero, every event has that field, and a zero duration is 0. Recordings with no durations omit the field. An integer type is restored only when str(int(text)) reproduces the text, so '001' stays '001'. A float type is restored only when str(float(text)) reproduces the text, so '2.50' stays '2.50'. A non-numeric type keeps every type as text.

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.

Parameters#

rawmne.io.BaseRaw | mne.BaseEpochs

MNE Raw or Epochs object.

Returns#

dict

EEG data structure.