PSD amplitude disparity

Hi,

I know about the difference between pylab.psd and mlab.psd, but in theory
the only difference between the returned values is:

pylab.psd = 10*log10(mlab.psd)

Except this is not true, there is noticeable difference:

pylab.psd = 23.4962 (all these pylab.psd values are read from graph)
10*log10(mlab.psd) = 17.2852

pylab.psd = 18.8973
10*log10(mlab.psd) = 12.8149

pylab.psd = 4.92
10*log10(mlab.psd) = -2.247

These all look suspiciously out by around 2pi, although by no means exact.
Any ideas?

code is:
pylab.psd(input, NFFT=512, Fs=sampleRate, window=blackman(512)) #graph
x,y = mlab.psd(input, NFFT=512, Fs=sampleRate, window=blackman(512)) #look
at x

···

--
View this message in context: http://old.nabble.com/PSD-amplitude-disparity-tp27754632p27754632.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

What version of mpl are you using? Could you try setting your
matplotlib rc parameter path.simplify to False? There is a known bug
in the released version of mpl that causes path simplification to
render lines improperly. Looking at the code, Axes.psd just calls
mlab.psd and then plots 10*log10(pxx), so if there is a difference the
most likely culprit is a rendering bug.
See http://matplotlib.sourceforge.net/users/customizing.html for
information on how to change your default matplotlib rc parameters.

Christoph, this is a serious bug that merits a branch bugfix release
ASAP. I will do the src release if you can do the win32 release.
Perhaps we can find someone who can build the OSX binaries for us
since my OSX box is dead. By I don't want to hold the release for
want of OSX binaries since this is a recurrent and serious problem.

JDH

···

On Tue, Mar 2, 2010 at 5:13 AM, Dunx <dunx@...1391...> wrote:

Hi,

I know about the difference between pylab.psd and mlab.psd, but in theory
the only difference between the returned values is:

pylab.psd = 10*log10(mlab.psd)

Except this is not true, there is noticeable difference:

pylab.psd = 23.4962 (all these pylab.psd values are read from graph)
10*log10(mlab.psd) = 17.2852

pylab.psd = 18.8973
10*log10(mlab.psd) = 12.8149

pylab.psd = 4.92
10*log10(mlab.psd) = -2.247

These all look suspiciously out by around 2pi, although by no means exact.
Any ideas?

code is:
pylab.psd(input, NFFT=512, Fs=sampleRate, window=blackman(512)) #graph
x,y = mlab.psd(input, NFFT=512, Fs=sampleRate, window=blackman(512)) #look
at x

That was it

Thanks :slight_smile:

John Hunter-4 wrote:

···

On Tue, Mar 2, 2010 at 5:13 AM, Dunx <dunx@...1391...> wrote:

Hi,

I know about the difference between pylab.psd and mlab.psd, but in theory
the only difference between the returned values is:

pylab.psd = 10*log10(mlab.psd)

Except this is not true, there is noticeable difference:

pylab.psd = 23.4962 (all these pylab.psd values are read from graph)
10*log10(mlab.psd) = 17.2852

pylab.psd = 18.8973
10*log10(mlab.psd) = 12.8149

pylab.psd = 4.92
10*log10(mlab.psd) = -2.247

These all look suspiciously out by around 2pi, although by no means
exact.
Any ideas?

code is:
pylab.psd(input, NFFT=512, Fs=sampleRate, window=blackman(512)) #graph
x,y = mlab.psd(input, NFFT=512, Fs=sampleRate, window=blackman(512))
#look
at x

What version of mpl are you using? Could you try setting your
matplotlib rc parameter path.simplify to False? There is a known bug
in the released version of mpl that causes path simplification to
render lines improperly. Looking at the code, Axes.psd just calls
mlab.psd and then plots 10*log10(pxx), so if there is a difference the
most likely culprit is a rendering bug.
See http://matplotlib.sourceforge.net/users/customizing.html for
information on how to change your default matplotlib rc parameters.

Christoph, this is a serious bug that merits a branch bugfix release
ASAP. I will do the src release if you can do the win32 release.
Perhaps we can find someone who can build the OSX binaries for us
since my OSX box is dead. By I don't want to hold the release for
want of OSX binaries since this is a recurrent and serious problem.

JDH

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
View this message in context: http://old.nabble.com/PSD-amplitude-disparity-tp27754632p27766635.html
Sent from the matplotlib - users mailing list archive at Nabble.com.