Basic usage¶
Basic usage is described on the GERBLS GitHub page. However, running GERBLS this way has limited functionality and is generally not recommended, other than for general testing purposes. To leverage the full functionality of GERBLS, refer to the fastbls example.
Basic usage is implemented via a wrapper function gerbls.run_bls() that returns a dictionary
containing the generated BLS spectrum:
- gerbls.run_bls(time, mag, err, min_period, max_period, t_samp=0.0, duration_mode='fractional', min_duration_factor=0.0, max_duration_factor=0.2)
A basic convenience function to generate a BLS spectrum. The data must be evenly sampled in time to run the BLS, use t_samp to specify the cadence for any resampling.
- Parameters:
time (npt.ArrayLike) – Array of observation timestamps.
mag (npt.ArrayLike) – Array of observed fluxes.
err (npt.ArrayLike) – Array of flux uncertainties for each observation.
min_period (float) – Minimum BLS period to search.
max_period (float) – Maximum BLS period to search.
t_samp (float, optional) – Time sampling to bin the data before running the BLS. If 0 (default), the median time difference between observations is used.
duration_mode (str, optional) – Determines how the tested transit durations are calculated at each period. If ‘constant’, the maximum duration is set to max_duration_factor. If ‘fractional’, the tested orbital period is multiplied by max_duration_factor. If ‘physical’, the expected transit duration for a circular orbit is multiplied by max_duration_factor.
min_duration_factor (float, optional) – A scaling factor that affects the minimum tested transit duration.
max_duration_factor (float, optional) – A scaling factor that affects the maximum tested transit duration.
- Returns:
Dictionary with BLS results: * P is the list of tested periods * dchi2 is the BLS statistic (Delta chi squared) at each period * t0 is the best-fit transit mid-point at each period * dur is the best-fit duration at each period * mag0 is the best-fit flux baseline at each period * dmag is the best-fit transit depth at each period
- Return type:
dict