Question
Preventing the Gibbs phenomenon on a reverse FFT
i am currently filtering some data and ran into trouble, when filtering smaller frequencies from a large trend.The Reverse FFTs seem to have large spikes at the beginning and the ending. Here is the Data before and after filtering smaller frequencies.
I have looked into the mathematic phenomenon and it is called the Gibbs phenomenon. Is there a way around this to clear the data of some overlying frequencies without getting this effect. Or is there even a workaround to keep the spikes as small as possible.
Here is the code BTW:
fourier_transformation= np.fft.fft(Sensor_4)
frequencies = np.fft.fftfreq(len(time), d=1/Values_per_second)
fourier_transformation[np.abs(frequencies) > 0.18] = 0
Sensor_4 = np.fft.ifft(fourier_transformation)