|
# Theoretical discrete Fourier power spectrum of the noise signal |
|
# following Gilman et al. (1963) and Torrence and Compo (1998), |
|
# equation 16. |
|
def pk(k, a, N): |
|
return (1 - a ** 2) / (1 + a ** 2 - 2 * a * np.cos(2 * np.pi * k / N)) |
|
fft_theor = pk(freq, alpha, n0) |
According to equation 16 from Torrence and Compo (1998) this code should look like this
def pk(k, a, N):
return (1 - a ** 2) / (1 + a ** 2 - 2 * a * np.cos(2 * np.pi * k / N))
fft_theor = pk(freq, alpha, 1)
This bug leads to different results of usage of significance function with signal and its variance.
pycwt/pycwt/wavelet.py
Lines 252 to 257 in 1bef44e
According to equation 16 from Torrence and Compo (1998) this code should look like this
This bug leads to different results of usage of
significancefunction with signal and its variance.