In [1]:
%pushd
%cd ../src
import EEG
%cd ..
p = EEG.EEG('Dog_2', 'interictal', 17)
p.normalize_channels()
%popd
In [2]:
%matplotlib inline
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = (16.0, 8.0)
import numpy as np
data = p.data
eeg = np.rollaxis(data, 1)
n = p.n_channels
spacing = 5
trace_levels = spacing*np.arange(n,0,-1)
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(eeg[0:2000, :] + trace_levels)
ax.plot(np.zeros((2000, n)) + trace_levels, '--', color='gray')
plt.yticks(trace_levels)
ax.set_yticklabels(p.electrode)
ax.axis('tight')
#ax.legend(first['channels'])
plt.show()