- static LombScarglePeriodogram.from_lightcurve(lc, minimum_frequency=None, maximum_frequency=None, minimum_period=None, maximum_period=None, frequency=None, period=None, nterms=1, nyquist_factor=1, oversample_factor=None, freq_unit=None, normalization='amplitude', ls_method='fast', **kwargs)¶
Periodogramfrom a LightCurve using the Lomb-Scargle method.
By default, the periodogram will be created for a regular grid of frequencies from one frequency separation to the Nyquist frequency, where the frequency separation is determined as 1 / the time baseline.
The min frequency and/or max frequency (or max period and/or min period) can be passed to set custom limits for the frequency grid. Alternatively, the user can provide a custom regular grid using the
frequencyparameter or a custom regular grid of periods using the
The sampling of the spectrum can be changed using the
oversample_factorparameter. An oversampled spectrum (oversample_factor > 1) is useful for displaying the full details of the spectrum, allowing the frequencies and amplitudes to be measured directly from the plot itself, with no fitting required. This is recommended for most applications, with a value of 5 or 10. On the other hand, an oversample_factor of 1 means the spectrum is critically sampled, where every point in the spectrum is independent of the others. This may be used when Lorentzians are to be fitted to modes in the power spectrum, in cases where the mode lifetimes are shorter than the time-base of the data (which is sometimes the case for solar-like oscillations). An oversample_factor of 1 is suitable for these stars because the modes are usually fully resolved. That is, the power from each mode is spread over a range of frequencies due to damping. Hence, any small error from measuring mode frequencies by taking the maximum of the peak is negligible compared with the intrinsic linewidth of the modes.
normalizationparameter will normalize the spectrum to either power spectral density (“psd”) or amplitude (“amplitude”). Users doing asteroseismology on classical pulsators (e.g. delta Scutis) typically prefer
normalization="amplitude"because “amplitude” has higher dynamic range (high and low peaks visible simultaneously), and we often want to read off amplitudes from the plot. If
normalization="amplitude", the default value for
oversample_factoris set to 5 and
freq_unitis 1/day. Alternatively, users doing asteroseismology on solar-like oscillators tend to prefer
normalization="psd"because power density has a scaled axis that depends on the length of the observing time, and is used when we are interested in noise levels (e.g. granulation) and are looking at damped oscillations. If
normalization="psd", the default value for
oversample_factoris set to 1 and
freq_unitis set to microHz. Default values of
oversample_factorcan be overridden. See Appendix A of Kjeldsen & Bedding, 1995 for a full discussion of normalization and measurement of oscillation amplitudes (http://adsabs.harvard.edu/abs/1995A%26A…293…87K).
The parameter nterms controls how many Fourier terms are used in the model. Setting the Nyquist_factor to be greater than 1 will sample the space beyond the Nyquist frequency, which may introduce aliasing.
freq_unitparameter allows a request for alternative units in frequency space. By default frequency is in (1/day) and power in (amplitude). Asteroseismologists for example may want frequency in (microHz) in which case they would pass
By default this method uses the LombScargle ‘fast’ method, which assumes a regular grid. If a regular grid of periods (i.e. an irregular grid of frequencies) it will use the ‘slow’ method. If nterms > 1 is passed, it will use the ‘fastchi2’ method for regular grids, and ‘chi2’ for irregular grids.
Caution: this method assumes that the LightCurve’s time (lc.time) is given in units of days.
- lcLightCurve object
The LightCurve from which to compute the Periodogram.
If specified, use this minimum frequency rather than one over the time baseline.
If specified, use this maximum frequency rather than nyquist_factor times the nyquist frequency.
If specified, use 1./minium_period as the maximum frequency rather than nyquist_factor times the nyquist frequency.
If specified, use 1./maximum_period as the minimum frequency rather than one over the time baseline.
The grid of frequencies to use. If given a unit, it is converted to units of freq_unit. If not, it is assumed to be in units of freq_unit. This over rides any set frequency limits.
The grid of periods to use (as 1/period). If given a unit, it is converted to units of freq_unit. If not, it is assumed to be in units of 1/freq_unit. This overrides any set period limits.
Default 1. Number of terms to use in the Fourier fit.
Default 1. The multiple of the average Nyquist frequency. Is overriden by maximum_frequency (or minimum period).
Default: None. The frequency spacing, determined by the time baseline of the lightcurve, is divided by this factor, oversampling the frequency space. This parameter is identical to the samples_per_peak parameter in astropy.LombScargle(). If normalization=’amplitude’, oversample_factor will be set to 5. If normalization=’psd’, it will be 1. These defaults can be overridden.
Default: None. The desired frequency units for the Lomb Scargle periodogram. This implies that 1/freq_unit is the units for period. With default normalization (‘amplitude’), the freq_unit is set to 1/day, which can be overridden. ‘psd’ normalization will set freq_unit to microhertz.
- normalization‘psd’ or ‘amplitude’
'amplitude'. The desired normalization of the spectrum. Can be either power spectral density (
'psd') or amplitude (
'fast'. Passed to the
Keyword arguments passed to
Returns a Periodogram object extracted from the lightcurve.