General Features (starclass.features)

Frequency Extraction (starclass.features.freqextr)

Code author: Rasmus Handberg <rasmush@phys.au.dk>

starclass.features.freqextr.freqextr(lightcurve, numfreq=6, hifac=1, ofac=4)[source]

Extract the highest amplitude frequencies from the timeseries.

Parameters:
  • lightcurve (lightkurve.LightCurve object) – Lightcurve to extract frequencies for.
  • numfreq (integer, optional) – Number of frequencies to extract.
  • hifac (integer, optional) – Nyquist factor.
  • ofac (integer, optional) – Oversampling factor used for initial search for peaks in power spectrum.
Returns:

Features

Return type:

dict

Code author: Rasmus Handberg <rasmush@phys.au.dk>

FliPer (starclass.features.fliper)

This code is the property of L. Bugnet (please see and cite Bugnet et al.,2018).

The user should use the FliPer method to calculate FliPer values from 0.2 ,0.7, 7, 20 and 50 muHz.

Code author: Lisa Bugnet <lisa.bugnet@cea.fr>

Code author: Rasmus Handberg <rasmush@phys.au.dk>

starclass.features.fliper.FliPer(psd)[source]

Compute FliPer values from 0.7, 7, 20, & 50 muHz

Parameters:psd (powerspectrum object) – Power spectrum of which to calculate the FliPer metrics.
Returns:Features from FliPer method.
Return type:dict

Power spectrum (starclass.features.powerspectrum)

Code author: Rasmus Handberg <rasmush@phys.au.dk>

class starclass.features.powerspectrum.powerspectrum(lightcurve, fit_mean=False)[source]

Bases: object

nyquist

Nyquist frequency in Hz.

Type:float
df

Fundamental frequency spacing in Hz.

Type:float
standard

Frequency in microHz and power density spectrum sampled from 0 to nyquist with a spacing of df.

Type:tuple
ls
Type:astropy.stats.LombScargle object
__init__(lightcurve, fit_mean=False)[source]
Parameters:
  • lightcurve (lightkurve.LightCurve object) – Lightcurve to estimate power spectrum for.
  • fit_mean (boolean, optional) –
fundamental_spacing_integral()[source]

Estimate fundamental spacing using the integral of the spectral window function.

fundamental_spacing_minimum()[source]

Estimate fundamental spacing using the first minimum spectral window function.

plot(ax=None, xlabel='Frequency (muHz)', ylabel=None, style='powerspectrum')[source]
powerspectrum(freq=None, oversampling=1, nyquist_factor=1, scale='power')[source]

Calculate power spectrum for time series.

Parameters:
  • freq (ndarray, optional) – Frequencies to calculate power spectrum for. If set to None, the full frequency range from 0 to nyquist``*``nyquist_factor is calculated.
  • oversampling (float, optional) – Oversampling factor. Default=1.
  • nyquist_factor (float, optional) – Nyquist factor. Default=1.
  • scale (string, optional) – ‘power’, ‘powerdensity’ and ‘amplitude’. Default=’power’.
Returns:

Tuple of two ndarray with frequencies in microHz and corresponding

power in units depending on the scale keyword.

Return type:

tuple

windowfunction(width=None, oversampling=10)[source]

Spectral window function.

Parameters:
  • width (float, optional) – The width in Hz on either side of zero to calculate spectral window.
  • oversampling (float, optional) – Oversampling factor. Default=10.