I am going to remove the noise from a brain recorded signal. It was a continuous recording and with sample rate=30kHz, it was digitized. So now it is a digital signal. I have written the code here for denoising this signal and I put two figures (the red one is the denoised one) including one big picture figure and the second one is by using zoom in. Below is the code.
wn=0.01 n=4 #order b, a= signal.butter(n, wn, btype='low', analog=False, output='ba') filtered = signal.lfilter(b, a, data_raw) plt.plot(data_raw, 'b', filtered,'r') plt.show()
Now I have several questions please (sorry if they are easy as I am a beginner):
1) Here we only determined the normalized frequency (wn). So if I want to know the low frequency of the filter, what is the default amount of sampling frequency for the Signal.butter function, please?
2) If I want to determine the sampling frequency of the butter filter by my self, is it the same sampling frequency as the data was digitized with? I mean the 30 kHz? If not what is the amount for this frequency, please? How should I determine it?
3) Do you have any other recommendations to filter this signal better and with less noise? Thanks a lot