Time Domain Analysis


In [2]:
import mne


Download sample data from Mike Cohen.

In [3]:
raw = mne.io.read_epochs_eeglab('sampleEEGdata.mat')
values = (raw.get_data().mean(axis=0).squeeze())
Extracting parameters from sampleEEGdata.mat...
99 matching events found
No baseline correction applied
Not setting metadata
0 projection items activated
<ipython-input-3-a9cfe698c8c0>:1: RuntimeWarning: At least one epoch has multiple events. Only the latency of the first event will be retained.
  raw = mne.io.read_epochs_eeglab('sampleEEGdata.mat')


All Channels in Time Domain (Butterfly Plot)

In [5]:
evoked = mne.EvokedArray(values, raw.info, tmin=-1)
evoked.plot(spatial_colors=True, time_unit='ms');

Single Channel (P1) in Time Domain

In [4]:
evoked = mne.EvokedArray(values, raw.info, tmin=-1)
Need more than one channel to make topography for eeg. Disabling interactivity.

Multiple Channels (FC6, T8, P1) in Time Domain

In [8]:
evoked = mne.EvokedArray(values, raw.info, tmin=-1)  # Convert it to an EvokedArray
evoked.pick_channels(['FC6', 'T8', 'P1'])
fig = evoked.plot(spatial_colors=True, time_unit='ms');

Support this work

You can support this work by getting the e-book. This notebook will always be available for free in its online format.