11.5.1.1. astroML.time_series.lomb_scargle¶
-
astroML.time_series.
lomb_scargle
(t, y, dy, omega, generalized=True, subtract_mean=True, significance=None)[source]¶ Deprecated since version 0.4: The lomb_scargle function is deprecated and may be removed in a future version. Use astropy.stats.LombScargle instead.
(Generalized) Lomb-Scargle Periodogram with Floating Mean
- Parameters
- tarray_like
sequence of times
- yarray_like
sequence of observations
- dyarray_like
sequence of observational errors
- omegaarray_like
frequencies at which to evaluate p(omega)
- generalizedbool
if True (default) use generalized lomb-scargle method otherwise, use classic lomb-scargle.
- subtract_meanbool
if True (default) subtract the sample mean from the data before computing the periodogram. Only referenced if generalized is False
- significanceNone or float or ndarray
if specified, then this is a list of significances to compute for the results.
- Returns
- parray_like
Lomb-Scargle power associated with each frequency omega
- zarray_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 [1]. 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. [2]). For a discussion of normalization and false-alarm probability, see [1].
To recover the normalization used in Scargle [3], the results should be multiplied by (N - 1) / 2 where N is the number of data points.
References