pandas - How do I plot the output of numpy.fft in bins? -
i wrote python code plots fast fourier transform of pandas dataframe called res, contains 2 columns of data ("data" , "filtered"):
fft = pd.dataframe(np.abs(np.fft.rfft(res["data"]))) fft.columns = ["data"] fft["filtered"] = pd.dataframe(np.abs(np.fft.rfft(res["filtered"])))  fft.index=np.fft.fftfreq(len(res))[0:len(fft)] fft.plot(logy=true, logx=true) the res dataset contains original randomised datapoints in "data" column along same data after passing through filter. output looks reasonable me;
while plot correct, it's not useful at. how can organise data smaller number of discrete frequency bins make easier understand?
 
 
  

Comments
Post a Comment