BLS results and analyzers

class gerbls.pyBLSAnalyzer(model, noise=None, allow_noise_interp=True)

BLS results analyzer.

Parameters:
  • model (gerbls.pyBLSModel) – BLS model generator that was used to generate the BLS spectrum.

  • noise (gerbls.pyNoiseBLS, optional) – BLS noise model (if desired), by default None.

  • allow_noise_interp (bool, optional) – Whether to interpolate the noise spectrum over the orbital period range. If False, model and noise must have the exact same number of tested periods. Has no effect if noise is None. By default True.

property dchi2: numpy.ndarray

Get the array of best-fit \(\Delta\chi^2\) values for each tested period.

property dmag: numpy.ndarray

Get the array of best-fit transit depths for each tested period.

property dur: numpy.ndarray

Get the array of best-fit transit durations for each tested period.

property f: numpy.ndarray

Get the array of tested orbital frequencies (= 1/period).

property mag0: numpy.ndarray

Get the array of best-fit out-of-transit flux baselines for each tested period.

property model: gerbls.pyBLSModel

Get the BLS model tied to this object.

property N_bins: numpy.ndarray

Get the number of data points (bins) in the phase-folded light curve for each tested period.

property noise: gerbls.pyNoiseBLS

Get the noise BLS instance tied to this object.

property P: numpy.ndarray

Get the array of tested orbital periods.

property snr: numpy.ndarray

Get an estimated SNR at each period from \(\textrm{SNR} \approx \sqrt{\Delta\chi^2}\).

property t0: numpy.ndarray

Get the array of best-fit transit midpoint times for each tested period.

fit_bls_trend(self, size_t window_length=1001)

Fit a trendline to the SNR values using a median filter.

Parameters:

window_length (int) – Window length for the median filter.

Returns:

Fitted SNR trend at each tested period.

Return type:

np.ndarray

generate_models(self, N_models, double unmaskf=0.005, bool use_SDE=False, **kwargs)

Identify the top BLS models (periods) in terms of highest \(\Delta\chi^2\) values.

Parameters:
  • N_models (int) – Number of models to generate.

  • unmaskf (float, optional) – The frequencies of any generated models must differ by at least this amount, by default 0.005.

  • use_SDE (bool, optional) – Whether to use the Signal Detection Efficiency (SDE) to identify peaks instead of the \(\Delta\chi^2\) values, by default False.

  • **kwargs – Any keyword arguments are passed to get_SDE(). Has no effect if use_SDE is False.

Returns:

List of gerbls.pyBLSResult corresponding to the identified models.

Return type:

list

get_SDE(self, **kwargs)

Calculate the Signal Detection Efficiency (SDE) at each tested period.

Parameters:

**kwargs – Passed to BLS trend calculation.

Returns:

Array of SDE values at each tested period.

Return type:

np.ndarray

class gerbls.pyBLSResult(blsa, index)

Fitted BLS model at a specific orbital period.

Parameters:
  • blsa (gerbls.pyBLSAnalyzer) – BLS analyzer object.

  • index (int) – Index of the orbital period stored in the BLS analyzer.

property dchi2: float

Get the \(\Delta\chi^2\) of the fitted model.

property dmag: float

Get the transit depth.

property dur: float

Get the transit duration.

property mag0: float

Get the out-of-transit flux baseline.

property P: float

Get the orbital period.

property r: float

Calculate the planet-to-star radius ratio.

property snr: float

Get an estimated SNR from \(\textrm{SNR} \approx \sqrt{\Delta\chi^2}\).

property snr_from_dchi2: float

Alias of snr.

property t0: float

Get the transit midpoint time.

get_SNR(self, pyDataContainer phot)

Calculate the transit SNR from uncertainty in dmag.

Parameters:

phot (gerbls.pyDataContainer) – Fitted data.

Return type:

float

get_dmag_err(self, pyDataContainer phot)

Calculate the uncertainty in dmag (transit depth).

Parameters:

phot (gerbls.pyDataContainer) – Fitted data.

Return type:

float

get_transit_mask(self, double[:] t)

Determine which of the given input times are in-transit.

Parameters:

t (ArrayLike) – Array of observation times.

Returns:

Boolean array with True values corresponding to in-transit data points.

Return type:

numpy.ndarray