I have an EEG data of 200 Hz and sampled at 4097. I have few doubts and questions related to this data:
- What does it mean by sampling in EEG data?
- I am getting the sample rate and the frequency when I plot the data as shown below. Shouldn't it be the time and frequency?
I don't understand what I'm missing here. Can anyone explain how am I supposed to identify the time and frequency of EEG data?
EEG data file : http://filesave.me/file/123174/eeg-txt.html
Thank you in advance.
Code for the above plot:
x = np.array([])
input = open('eeg.txt', 'r')
for file in input:
file = file.replace(',','')
x = np.append(x, float(file))
input.close()
plt.subplot(1, 1, 1)
plt.plot(x)
plt.ylabel('EEG signal')
plt.show()
FFT calculation:
import numpy as np
x = np.array([])
input = open('eeg.txt', 'r')
for file in input:
file = file.replace(',','')
x = np.append(x, float(file))
input.close()
plt.subplot(1, 1, 1)
ff = fft(x)
plt.plot(ff)
plt.ylabel('EEG signal')
plt.show()
Wavelet decomposition:
coeffs = wavedec(x, 'db4', level=6)
cA2, cD1, cD2,cD3,cD4,cD5,cD6 = coeffs
plt.subplot(7, 1, 1)
plt.plot(x)
plt.ylabel('Noisy Signal')
plt.subplot(7, 1, 2)
plt.plot(cD6)
plt.ylabel('noisy')
plt.subplot(7,1,3)
plt.plot(cD5)
plt.ylabel("gamma")
plt.subplot(7,1,4)
plt.plot(cD4)
plt.ylabel("beta")
plt.subplot(7,1,5)
plt.plot(cD3)
plt.ylabel("alpha")
plt.subplot(7,1,6)
plt.plot(cD2)
plt.ylabel("theta")
plt.subplot(7,1,7)
plt.plot(cD1)
plt.ylabel("delta")
plt.draw()
plt.show()
fft
in Python. $\endgroup$