11.14.1. astroML_addons.periodogram.lomb_scargle¶
- astroML_addons.periodogram.lomb_scargle()¶
(Generalized) Lomb-Scargle Periodogram with Floating Mean
Parameters : t : array_like
sequence of times
y : array_like
sequence of observations
dy : array_like
sequence of observational errors
omega : array_like
frequencies at which to evaluate p(omega)
generalized : bool
if True (default) use generalized lomb-scargle method otherwise, use classic lomb-scargle.
subtract_mean : bool
if True (default) subtract the sample mean from the data before computing the periodogram. Only referenced if generalized is False.
significance : None or float or ndarray
if specified, then this is a list of significances to compute for the results.
Returns : p : array_like
Lomb-Scargle power associated with each frequency omega
z : array_like
if significance is specified, this gives the levels corresponding to the desired significance (using the Scargle 1982 formalism)
Notes
The algorithm is based on reference [R24]. The result for generalized=False is given by equation 4 of this work, while the result for generalized=True is given by equation 20.
Note that the normalization used in this reference is different from that used in other places in the literature (e.g. [R25]). For a discussion of normalization and false-alarm probability, see [R24].
To recover the normalization used in Scargle [R26], the results should be multiplied by (N - 1) / 2 where N is the number of data points.
References
[R24] (1, 2, 3) - Zechmeister and M. Kurster, A&A 496, 577-584 (2009)
[R25] (1, 2) - Press et al, Numerical Recipies in C (2002)
[R26] (1, 2) Scargle, J.D. 1982, ApJ 263:835-853