[SciPy-User] Find the RMS from a PSD
E
pub at jesuislibre.net
Tue Jan 25 09:06:49 EST 2011
I think this was a bug in the PSD function in matplotlib 0.98.1 (Debian
lenny). This was making me crazy.
I took newer source code of this function from the project and all is
going well.
So to get the RMS power from PSD :
y, x = pylab.psd(data, NFFT = nfft, Fs = samplerate)
freqbandwith = x[1]
y = y*freqbandwith
rms = scipy.sqrt(y.sum())
It should be the same as :
rms = data**2
rms = scipy.sqrt(rms.sum()/len(data))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110125/c9106a94/attachment.html>
More information about the SciPy-User
mailing list