[Mne_analysis] MNE and EEG channel synchrony

Alexandre Gramfort alexandre.gramfort at telecom-paristech.fr
Tue Oct 14 15:43:57 EDT 2014
Search archives:

hi,

here is a code snippet that should help.

Best,
Alex

---
import numpy as np
import mne

sfreq = 1000.
n_channels = 60
n_times = int(sfreq * 30)  # 30s of data
data = 1e-6 * np.random.randn(n_channels, n_times)  # data in microvolts
ch_names = ['EEG%03d' % (k + 1) for k in range(n_channels)]
ch_types = ['eeg' for _ in range(n_channels)]
info = mne.create_info(ch_names, sfreq, ch_types)
raw = mne.io.RawArray(data, info)
events = mne.make_fixed_length_events(raw, id=1, duration=5.)
epochs = mne.Epochs(raw, events, event_id=1, tmin=0, tmax=5.)
evoked = epochs.average()
evoked.plot()



More information about the Mne_analysis mailing list