lightkurve.periodogram.
LombScarglePeriodogram
(*args, **kwargs)¶Bases: lightkurve.periodogram.Periodogram
Subclass of Periodogram
representing a power spectrum generated using the Lomb Scargle method.
Attributes Summary
frequency_at_max_power 
Returns the frequency corresponding to the highest peak in the periodogram. 
max_power 
Returns the power of the highest peak in the periodogram. 
period 
Returns the array of periods, i.e. 
period_at_max_power 
Returns the period corresponding to the highest peak in the periodogram. 
Methods Summary
bin ([binsize, method]) 
Bins the power spectrum. 
copy () 
Returns a copy of the Periodogram object. 
flatten ([method, filter_width, return_trend]) 
Estimates the SignalToNoise (SNR) spectrum by dividing out an estimate of the noise background. 
from_lightcurve (lc[, min_frequency, …]) 
Creates a Periodogram from a LightCurve using the LombScargle method. 
plot ([scale, ax, xlabel, ylabel, title, …]) 
Plots the Periodogram. 
show_properties () 
Prints a summary of the noncallable attributes of the Periodogram object. 
smooth ([method, filter_width]) 
Smooths the power spectrum using the ‘boxkernel’ or ‘logmedian’ method. 
to_table () 
Exports the Periodogram as an Astropy Table. 
Attributes Documentation
frequency_at_max_power
¶Returns the frequency corresponding to the highest peak in the periodogram.
max_power
¶Returns the power of the highest peak in the periodogram.
period
¶Returns the array of periods, i.e. 1/frequency.
period_at_max_power
¶Returns the period corresponding to the highest peak in the periodogram.
Methods Documentation
bin
(binsize=10, method='mean')¶Bins the power spectrum.
Parameters: 


Returns: 

copy
()¶Returns a copy of the Periodogram object.
This method uses the copy.deepcopy
function to ensure that all
objects stored within the Periodogram are copied.
Returns: 


flatten
(method='logmedian', filter_width=0.01, return_trend=False)¶Estimates the SignalToNoise (SNR) spectrum by dividing out an estimate of the noise background.
This method divides the power spectrum by a background estimated
using a moving filter in log10 space by default. For details on the
method
and filter_width
parameters, see Periodogram.smooth()
Dividing the power through by the noise background produces a spectrum
with no units of power. Since the signal is divided through by a measure
of the noise, we refer to this as a SignalToNoise
spectrum.
Parameters: 


Returns: 

from_lightcurve
(lc, min_frequency=None, max_frequency=None, min_period=None, max_period=None, frequency=None, period=None, nterms=1, nyquist_factor=1, oversample_factor=1, freq_unit=<Quantity 1. 1 / d>, **kwargs)¶Creates a Periodogram from a LightCurve using the LombScargle 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 frequency
parameter or a custom regular grid of periods using the period
parameter.
The spectrum can be oversampled by increasing the oversample_factor parameter. The parameter nterms controls how many Fourier terms are used in the model. Note that many terms could lead to spurious peaks. Setting the Nyquist_factor to be greater than 1 will sample the space beyond the Nyquist frequency, which may introduce aliasing.
The unit parameter allows a request for alternative units in frequency
space. By default frequency is in (1/day) and power in (ppm^2 * day).
Asteroseismologists for example may want frequency in (microHz) and
power in (ppm^2 / microHz), in which case they would pass
unit = u.microhertz
where u
is astropy.units
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. The normalizatin of the Lomb Scargle periodogram is
fixed to psd
, and cannot be overridden.
Caution: this method assumes that the LightCurve’s time (lc.time) is given in units of days.
Parameters: 


Returns: 

plot
(scale='linear', ax=None, xlabel=None, ylabel=None, title='', style='lightkurve', view=None, unit=None, **kwargs)¶Plots the Periodogram.
Parameters: 


Returns: 

show_properties
()¶Prints a summary of the noncallable attributes of the Periodogram object.
Prints in order of type (ints, strings, lists, arrays and others). Prints in alphabetical order.
smooth
(method='boxkernel', filter_width=0.1)¶Smooths the power spectrum using the ‘boxkernel’ or ‘logmedian’ method.
If method
is set to ‘boxkernel’, this method will smooth the power
spectrum by convolving with a numpy Box1DKernel with a width of
filter_width
, where filter width
is in units of frequency.
This is best for filtering out noise while maintaining seismic mode
peaks. This method requires the Periodogram to have an evenly spaced
grid of frequencies. A ValueError
exception will be raised if this is
not the case.
If method
is set to ‘logmedian’, it smooths the power spectrum using
a moving median which moves across the power spectrum in a steps of
log10(x0) + 0.5 * filter_width
where filter width
is in log10(frequency) space. This is best for
estimating the noise background, as it filters over the seismic peaks.
Parameters: 


Returns: 

to_table
()¶Exports the Periodogram as an Astropy Table.
Returns: 


Created with ♥ by the Lightkurve developers. Join us on GitHub.