obspy.signal.spectral_estimation.psd¶
- psd(x, NFFT=256, Fs=2, detrend=<function detrend_none at 0x43c6aecc>, window=<function window_hanning at 0x43c6a80c>, 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 1/Hz by dividing with sampling rate.
Deprecated since version 0.11.0: This wrapper is no longer necessary. Please use the matplotlib.mlab.psd() function directly, specifying sides=”onesided” and scale_by_freq=True.
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.