Python, Data Science, Engineering, Science, Electronics.
Let’s filter out the other frequencies! yf_abs = np.abs(yf) indices = yf_abs>300 # filter out those value under 300 yfClean = indices * yf # noise frequency will be set to 0 plt.plot(xf,np.abs(yfClean),linewidth=1,label="DFT Removed Noise Frequencies") plt.margins(x=0, y=0.5) plt.legend()