[Matplotlib-users] mlab: computing power spectra

2015-02-11 Thread Antonino Ingargiola
Hi to all, I'm computing some spectrograms using the convenient functions defined in matplotlib.mlab. I found something that I don't completely understand. In computing the PSD the onesided power spectrum is scaled by a factor of 2 except for the first and the last bin:

Re: [Matplotlib-users] mlab: computing power spectra

2015-02-11 Thread Antonino Ingargiola
Thanks Paul, your explanation makes perfectly sense. Indeed, computing manually the PDS (using numpy.fft) in a test case gives me equal power for sine wave component of same amplitude, even when a component is in the highest frequency bin. However, giving the same test case to