[SciPy-Dev] Pull Req: Add periodogram and welch functions

Eric Moore ewm@redtetrahedron....
Tue Dec 4 06:51:14 CST 2012

josef.pktd@gmail.com wrote:
> On Mon, Dec 3, 2012 at 10:26 PM, Jake Vanderplas
> <vanderplas@astro.washington.edu>  wrote:
>> Hi Eric,
>> The contribution looks good.  Have you compared your results to those of
>> matplotlib.mlab.psd()?  I believe that also implements Welch's method.
>>      Jake
> I'm also glad someone provides this in scipy.
> nitime from the nipy community also has more spectral analysis.
> Just one question: Should the periodogram have a bandwidth, window
> length choice?
> for example what's the M in your "flattop" example.
> partial aside:
> I worked on this for statsmodels some time (years) ago, but I never
> could quite figure out how to do the windows smoothing with the
> provided windows. (statsmodels only has raw, unwindowed periodogram
> and spectral density from estimated IIR/ARMA coefficients.)
> I didn't manage to get matplotlib's Welch implementation to work
> meaningfully for short time series that we have in economics, but I
> think your periodogram should "work like in the textbook".
> Thanks,
> Josef
>> On 12/03/2012 06:54 PM, Eric Moore wrote:
>>> Hi, I've just submitted a pull request to add a function to compute a
>>> simple (modified) periodogram and a periodogram using Welch's method.
>>> The pull request is https://github.com/scipy/scipy/pull/373
>>> The biggest question I have with my implementation is whether welch
>>> should support padded FFTs and detrending.  But I'm happy to hear any
>>> feedback.
>>> Eric

I'm not sure what M is.  The size of the window is nfft.


More information about the SciPy-Dev mailing list