I'm wondering if I got some errors in my emg data + fft code
[I got 0Hz filtered emg data]
plt.figure(figsize=(20,10))
sns.lineplot(data = DF_newemg, x = DF_newemg.index, y = 'emg[2]', label = 'DF_newemg')
sns.lineplot(data = DF_newemg_filtered, x = DF_newemg_filtered.index, y = 'emg[2]', label = 'DF_newemg_filtered')
plt.show()
(https://i.sstatic.net/gd5Bp3Iz.png)
And then, I got only positive frequencies and fft_values with fft thing.
fs = 1000
from scipy.fft import fft, fftfreq
N = len(DF_newemg_filtered['emg[0]'])
freqs = fftfreq(N, d=1/fs)
fft_values = fft(DF_newemg_filtered['emg[0]'].to_numpy())
positive_freqs = freqs[:N // 2]
fft_values = abs(fft_values[:N//2])
plt.plot(positive_freqs, fft_values, label='Filtered Signal Spectrum', color='blue')
(https://i.sstatic.net/oJ9chuSA.png)
But As you see, 0Hz and 0~100 Hz have high peaks, and I don't know how to solve this problems. (Even the emg device already had 50Hz notch filter) And wondering if the y-axis values are correct.
Can I get some answer please want some help :(