spec¶
- kgpy.fft.power.spec(data, n_frequencies=16, dx=1.0, radians=False, retain_dc=False)¶
This is a port of CCK’s powerspec.pro to Python 3. Ported by NCG, 2020-08-02
Compute power spectrum of a 1D array by dividing into multiple overlapping segments and averaging the power spectra. This improves the estimate at the expense of spectral resolution. The normalization convention is the same as with periodogram_fft.pro. The method is a particular implementation of Welch’s method (IEEE Trans. Audio & Electroacoustics, 15:2:70-73, June, 1967). I have used the Hanning cosinusoidal window.
- Parameters:
data (
numpy.ndarray) –n_frequencies (
int) –dx (
float) –radians (
bool) –retain_dc (
bool) –
- Returns: