obspy.signal.spectral_estimation.psd

psd(x, NFFT=256, Fs=2, detrend=<function detrend_none at 0x26869b0>, window=<function window_hanning at 0x2686758>, noverlap=0)[source]

Wrapper for matplotlib.mlab.psd().

Always returns a onesided psd (positive frequencies only), corrects for this fact by scaling with a factor of 2. Also, always normalizes to dB/Hz by dividing with sampling rate.

This wrapper is intended to intercept changes in matplotlib.mlab.psd() default behavior which changes with matplotlib version 0.98.4:

Note

For details on all arguments see matplotlib.mlab.psd().

Note

When using window=welch_taper (obspy.signal.spectral_estimation.welch_taper()) and detrend=detrend_linear (matplotlib.mlab.detrend_linear()) the psd function delivers practically the same results as PITSA. Only DC and the first 3-4 lowest non-DC frequencies deviate very slightly. In contrast to PITSA, this routine also returns the psd value at the Nyquist frequency and therefore is one frequency sample longer.

This Page