API Reference

Pipeline classes

class cetra.LightCurve(times: ndarray, fluxes: ndarray, flux_errors: ndarray, resample_cadence: float | None = None, verbose: bool = True)[source]

Bases: object

A stellar light curve, resampled to a regular cadence via GPU.

On construction the input data are validated, sorted chronologically, and resampled onto a uniform time grid using a GPU kernel (resample_k1 / resample_k2). Gaps in coverage are filled with null points (flux = NaN, flux_error = inf) so that any point in time can be located by simple index arithmetic.

time

Resampled time array in days.

Type:

ndarray

flux

Resampled flux array (relative to baseline).

Type:

ndarray

flux_error

Resampled flux error array.

Type:

ndarray

cadence

Cadence of the resampled light curve in days.

Type:

float

size

Number of points in the resampled light curve.

Type:

int

reference_time

Value of time[0]; used to form offset_time.

Type:

float

offset_time

time - reference_time (starts at zero).

Type:

ndarray

flux_weight

1 / flux_error ** 2

Type:

ndarray

offset_flux

1 - flux

Type:

ndarray

flat_loglike

Log-likelihood of the constant (no-transit) flux model.

Type:

float

input_cadence

Detected cadence of the raw input data in days.

Type:

float

input_num_points

Number of points in the raw input data.

Type:

int

transit_mask

Boolean array where True marks in-transit points. None until mask_transit() is called.

Type:

ndarray or None

offset_trend

Fitted trend array (set by the deprecated get_trend).

Type:

ndarray or None

error_multiplier

Error inflation factor (set by the deprecated get_trend).

Type:

float or None

Basic light curve validation and class instance initialisation.

Parameters:
  • times (array-like) – Sequence of light curve observation time points in days.

  • fluxes (array-like) – Sequence of light curve relative (to baseline) flux points.

  • flux_errors (array-like) – Sequence of light curve relative (to baseline) flux error points.

  • resample_cadence (float, optional) – The cadence (in seconds) to use for resampling the light curve. By default, the module will try to detect the underlying cadence.

  • verbose (bool, optional) – If True (the default), reports various messages.

copy() LightCurve[source]

Return a copy of this LightCurve instance

Return type:

A copy of this LightCurve instance

mask_transit(transit: Transit, duration_multiplier: float = 1.0, return_mask: bool = False) ndarray | None[source]

Mask a transit

Parameters:
  • transit (Transit) – The transit to mask (can be single or have period)

  • duration_multiplier (float, optional) – A multiplier on the transit duration, applied to ensure that all in-transit flux is removed. Default 1.0, i.e. no border.

  • return_mask (bool, optional) – If True, returns the mask for this transit only. Default False.

Returns:

  • 1D ndarray with in-transit points as True and out of transit as

  • False, if return_mask==True.

pad(num_points_prepend: int, num_points_append: int, verbose: bool = True) None[source]

Pad the light curve with null data. (Note: Any existing transit masks will be lost, it’s recommended to remask again using the Transit objects.)

Parameters:
  • num_points_prepend (int) – The number of points to prepend to the light curve.

  • num_points_append (int) – The number of points to append to the light curve.

  • verbose (bool, optional) – If True (the default), reports various messages.

resample(new_cadence: float, cuda_blocksize: int = 1024) tuple[ndarray, ndarray, ndarray][source]

Resample the light curve at a new cadence. (Note: Any existing transit masks will be lost, it’s recommended to remask again using the Transit objects.)

Parameters:
  • new_cadence (float) – The desired output observation cadence (i.e. the time between samples).

  • cuda_blocksize (int, optional) – The number of threads per block. Should be a multiple of 32 and less than or equal to 1024. Default 1024.

Return type:

A LightCurve instance with the new sampling cadence

class cetra.TransitModel(transit_model: ndarray | str, downsamples: int = 1024, verbose: bool = True)[source]

Bases: object

A normalised transit shape, downsampled for use by the GPU kernels.

The model is stored in GPU shared memory during the linear search, so its size is constrained by the available shared memory per block. The default of 1024 samples gives a maximum nearest-neighbour interpolation error of ~1 %.

model

The downsampled transit model (flux values, max 1.0 at baseline).

Type:

ndarray

offset_model

1 - model (pre-computed to save repeated GPU operations).

Type:

ndarray

size

Number of samples in the downsampled model.

Type:

int

input_model

The raw model array supplied by the user (or loaded from file).

Type:

ndarray

Initialise the TransitModel class

Parameters:
  • transit_model (array-like or string) – transit_model can be either a 1D array containing floating point offsets relative to baseline flux, or a string corresponding to one of three internal models. If a 1D array is supplied, the maximum offset from baseline flux should be 1. Ideally the array length will be greater than the value of downsamples (which is 1024 elements by default). CETRA does not force transit depth to be positive. (So e.g. a flare model can be provided and the depths returned will be negative.) Alternatively, one of the strings ‘b32’, ‘b93’ or ‘b99’ can be supplied. In this case, a model with impact parameter 0.32, 0.93 or 0.99, respectively, will be used. All other parameters are: {'rp': 0.03, 'u': (0.4804, 0.1867), 'period': 10.0, 'semimajor_axis': 20.0}.

  • downsamples (int, optional) – Downsample the transit model to this number of samples for use by the GPU kernels. Ideally a power of 2. It’s best to be conservative with this value, since the volume of GPU shared memory (in which the transit model is stored) is fairly limited. The default value is 1024 elements. The larger the value, the smaller the max error in the model. A value of 1024 gives a maximum error of ~1%, 2048 is ~0.5%, 512 is ~2%.

  • verbose (bool, optional) – If True (the default), reports various messages.

copy() TransitModel[source]

Return a copy of this TransitModel instance

Return type:

A copy of this TransitModel instance

get_model_lc(times: ndarray, transit: Transit) tuple[ndarray, ndarray][source]

Get orbital phase and model flux at the given time points for the given Transit object.

Parameters:
  • times (array-like) – The time points for which the model flux is sought.

  • transit (Transit) – The Transit object for the given transit.

Returns:

  • Two 1D ndarrays of orbital phases and model fluxes for the given time

  • points

interpolate(samples: int, kind: str = 'linear') tuple[interp1d, ndarray][source]

Resample an input model using interpolation

Parameters:
  • samples (int) – The required number of samples

  • kind (str, optional) – A scipy.interpolate.interp1d interpolation method. ‘linear’ is the default.

Return type:

The interpolator object and the model with the required number of samples

nn_error() tuple[float, float][source]

Return the maximum and mean error in the model due to the use of nearest-neighbour interpolation.

class cetra.TransitDetector(light_curve: LightCurve, transit_model: TransitModel | None = None, durations: ndarray | None = None, min_duration: float = 0.02, max_duration: float = 1.0, duration_log_step: float = 1.1, t0_stride_fraction: float = 0.01, verbose: bool = True)[source]

Bases: object

Main orchestrator for the CETRA two-stage detection pipeline.

Wraps a LightCurve and TransitModel, builds the duration and t0 grids, then exposes linear_search() and period_search() to run the GPU kernels and extract transit parameters.

lc

A padded copy of the input light curve (padded by half the maximum duration at each end to handle edge transits).

Type:

LightCurve

durations

Transit duration grid in days.

Type:

ndarray

transit_model

The transit model in use.

Type:

TransitModel

t0_array

Grid of mid-transit times searched during the linear search.

Type:

ndarray

t0_stride_length

Spacing between t0 grid points in days.

Type:

float

periods

Period grid used in the most recent period_search(), or None if it has not been run.

Type:

ndarray or None

min_durations

Per-period minimum physically-motivated transit duration, populated after period_search().

Type:

ndarray or None

max_durations

Per-period maximum physically-motivated transit duration, populated after period_search().

Type:

ndarray or None

linear_result

Result of the most recent linear_search(), or None.

Type:

LinearResult or None

periodic_result

Result of the most recent period_search(), or None.

Type:

PeriodicResult or None

Initialise the transit detector.

Parameters:
  • light_curve (LightCurve) – The light curve.

  • transit_model (TransitModel, optional) – This TransitModel will be used, if provided, instead of the default. The default model is for a transit with the following parameters: {'rp': 0.03, 'b': 0.32, 'u': (0.4804, 0.1867), 'period': 10.0, 'semimajor_axis': 20.0}.

  • durations (array-like, optional) – User-specified grid of durations in days. If not provided, the module computes a grid using the minimum and maximum durations and the log step.

  • min_duration (float, optional) – Minimum transit duration to check in days, default 0.02. Unnecessary if an array of durations is provided.

  • max_duration (float, optional) – Maximum transit duration to check in days, default 1.0. Unnecessary if an array of durations is provided.

  • duration_log_step (float, optional) – The log-spacing of the durations to be used if the duration grid is to be internally determined. Default 1.1. Unnecessary if an array of durations is provided.

  • t0_stride_fraction (float, optional) – The fraction of the minimum duration that determines the length of each t0 stride. The default is 1% of the minimum duration.

  • verbose (bool, optional) – If True (the default), reports various messages.

check_period(period: float, min_duration: float, max_duration: float) tuple[float, float, float, int, int][source]

Find the maximum likelihood ratio (vs. constant flux model), depth, depth variance, t0 and duration for a given period.

Parameters:
  • period (float) – The period to check

  • min_duration (float) – Minimum duration to check.

  • max_duration (float, optional) – Maximum duration to check. Must be less than the period or results are invalid, CETRA will warn and set it to the period when necessary.

Returns:

  • Tuple of len=5 containing the maximum likelihood ratio and the

  • corresponding depth, depth variance, t0 index and duration index

  • for the input period.

get_max_likelihood_periodic_transit() Transit | None[source]

Return the parameters of the maximum likelihood periodic transit event in the light curve, using the results of the period search.

Return type:

The maximum likelihood periodic transit as a Transit object.

get_max_likelihood_single_transit() Transit | None[source]

Return the parameters of the maximum likelihood single transit event in the light curve, using the results of the linear search.

Return type:

The maximum likelihood single transit as a Transit object.

get_max_snr_periodic_transit(absolute_depth: bool = False) Transit | None[source]

Return the parameters of the maximum SNR periodic transit event in the light curve, using the results of the period search.

Parameters:

absolute_depth (bool, optional) – If True, computes SNR as abs(S/N), otherwise SNR is S/N. False by default.

Return type:

The maximum SNR periodic transit as a Transit object.

get_max_snr_single_transit(absolute_depth: bool = False) Transit | None[source]

Return the parameters of the maximum SNR single transit event in the light curve, using the results of the linear search.

Parameters:

absolute_depth (bool, optional) – If True, computes SNR as abs(S/N), otherwise SNR is S/N. False by default.

Return type:

The maximum SNR single transit as a Transit object.

get_periodic_transits_above_snr_threshold(snr_threshold: float, duration_multiplier: float = 1.3, max_transits: int = 10, absolute_depth: bool = False) list[Transit] | None[source]

Return the parameters of periodic transits with SNR above a given threshold. May miss transits that overlap with more significant ones.

Parameters:
  • snr_threshold (float) – The SNR threshold above which to return TCEs.

  • duration_multiplier (float, optional) – The multiplier on the transit duration to use when masking out transits.

  • max_transits (int, optional) – The maximum number of transits to return. This is to prevent the method from running indefinitely if the SNR threshold is set too low. Default is 10.

  • absolute_depth (bool, optional) – If True, computes SNR as abs(S/N), otherwise SNR is S/N. False by default.

Returns:

  • A list of Transit objects for transits with SNR above the given

  • threshold.

get_single_transits_above_snr_threshold(snr_threshold: float, duration_multiplier: float = 1.3, max_transits: int = 200, absolute_depth: bool = False) list[Transit] | None[source]

Return the parameters of single transits with SNR above a given threshold. May miss transits that overlap with more significant ones.

Parameters:
  • snr_threshold (float) – The SNR threshold above which to return TCEs.

  • duration_multiplier (float, optional) – The multiplier on the transit duration to use when masking out transits.

  • max_transits (int, optional) – The maximum number of transits to return. This is to prevent the method from running indefinitely if the SNR threshold is set too low. Default is 200.

  • absolute_depth (bool, optional) – If True, computes SNR as abs(S/N), otherwise SNR is S/N. False by default.

Returns:

  • A list of Transit objects for transits with SNR above the given

  • threshold.

get_trend(detection_kernel_width, detrending_kernel_width, IC_type=0, dIC_threshold=10.0, min_depth_ppm=10.0, min_obs_count=20, full_output=False, n_warps=4096, verbose=True)[source]

Obtain the trend of the light curve using a quadratic+transit model, after a preliminary detection of likely transit signals.

Parameters:
  • detection_kernel_width (float) – Width of the detection kernel in days. This might be motivated by some prior knowledge about the activity or rotation rate of the target, but should be longer than the maximum transit duration.

  • detrending_kernel_width (float) – Width of the detrending kernel in days. This might be motivated by some prior knowledge about the activity or rotation rate of the target, but should be longer than the maximum transit duration. Note: in the detrending kernel, when the locations of the transits are ‘known’, only a single depth value is fitted within a kernel width. This means transits closer together than the kernel width are likely to be poorly modelled as they’ll have the same depth. Perhaps it’s better to simply mask the detected transits after all…

  • IC_type (int) – The information criterion type. 0 is Bayesian (default), 1 is Akaike.

  • dIC_threshold (float) – The information criterion difference threshold to use to select regions in the t0,duration space in which the quadratic+transit model is more likely than the quadratic model. The statistic is defined as dIC = IC_quadratic - IC_transit, so larger dIC values mean the quad+transit model is more preferred. Default 10.

  • min_depth_ppm (float, optional) – Minimum transit depth to consider in ppm. Default 10 ppm.

  • min_obs_count (int, optional) – Minimum number of observations required in the kernel window. Default 20.

  • full_output (bool, optional) – If True, returns some intermediate arrays. If False (the default), nothing is returned.

  • n_warps (int, optional) – The number of warps to use, default 4096. We want this to be around a low integer multiple of the number of concurrent warps able to run on the GPU. The A100 has 108 SMs * 64 warps = 6912 concurrent warps. The RTX A5000 has 64 SMs * 48 warps = 3072 concurrent warps. Striding in this way limits the number of reads of the transit model from global into shared memory. This value shouldn’t exceed the number of t0 strides times the number of durations.

  • verbose (bool, optional) – If True, reports with additional verbosity.

Returns:

  1. The number of data points in each detection kernel window

    ndarray of len(t0_array)

  2. The log-likelihoods of the quadratic models

    ndarray of len(t0_array)

  3. The log-likelihoods of the quadratic+transit models

    ndarray of shape (len(durations), len(t0_array))

  4. The delta IC array

    ndarray of shape (len(durations), len(t0_array))

  5. The transit(s) model

    ndarray of len(light curve)

  6. The fitted trend array

    ndarray of len(light curve)

  7. The estimated error multiplier

    single floating point value

Return type:

If full_output == True, then arrays of

Perform a grid search in t0 and duration for transit-like signals in the light curve.

Parameters:
  • n_warps (int, optional) – The number of warps to use, default 4096. We want this to be around a low integer multiple of the number of concurrent warps able to run on the GPU. The A100 has 108 SMs * 64 warps = 6912 concurrent warps. The RTX A5000 has 64 SMs * 48 warps = 3072 concurrent warps. Striding in this way limits the number of reads of the transit model from global into shared memory. This value shouldn’t exceed the number of t0 strides times the number of durations.

  • verbose (bool, optional) – If True, reports the parameters of the maximum likelihood and maximum SNR transits. Default is True.

Return type:

LinearResult

Run a search for periodic signals within a LinearResult.

Parameters:
  • periods (array-like, optional) – User-provided period grid. If not provided, the module determines an optimal period grid using various other kwargs.

  • min_period (float, optional) – The minimum period to consider. Set to 0.0 for no lower limit, which in practice means it’s limited by the astrophysics (or the sampling cadence), this is the default setting.

  • max_period (float, optional) – The maximum period to consider. Set to inf for no upper limit, which in practice means it’s limited by the light curve duration and the minimum number of required transits, this is the default setting.

  • n_transits_min (int, optional) – The minimum number of transits that must have coverage. This parameter impacts the period grid, in that the maximum period is limited to the light curve epoch baseline divided by n_transits_min. The default is to require 2 transits.

  • pgrid_R_star (float, optional) – The stellar radius (in solar radii) to use for period grid determination, default 1.0.

  • pgrid_M_star (float, optional) – The stellar mass (in solar masses) to use for period grid determination, default 1.0.

  • pgrid_oversample (int, optional) – Oversample the period grid by this factor, default 3. Increasing this improves detection efficiency but at a higher computational cost.

  • ignore_astrophysics (bool, optional) – If True, the duration is only required to be less than the period times the max_duration_fraction. If False, the duration is also required to be astrophysically plausible (the default behaviour).

  • max_duration_fraction (float, optional) – Maximum allowable duration as a fraction of the period, default 0.12.

  • min_star_mass (float, optional) – Minimum star mass to consider when determining duration limits for a given period. Units of solar masses, default 0.1.

  • max_star_mass (float, optional) – Maximum star mass to consider when determining duration limits for a given period. Units of solar masses, default 1.0.

  • min_star_radius (float, optional) – Minimum star radius to consider when determining duration limits for a given period. Units of solar radii, default 0.13.

  • max_star_radius (float, optional) – Maximum star radius to consider when determining duration limits for a given period. Units of solar radii, default 3.5.

  • circular_orbits (bool, optional) – If True, considers only circular orbits when determining duration limits (default True).

  • random_order (bool, optional) – If True (the default), the period grid is shuffled before computation. This provides a more accurate estimated compute time and progress bar. If False then the periodogram is populated in ascending order of period.

  • verbose (bool, optional) – If True (the default), provides a progress bar and estimated time to completion courtesy of the tqdm package. Otherwise, only some basic info/warnings are reported.

Return type:

PeriodicResult

Result classes

class cetra.Transit(t0: float, duration: float, depth: float, depth_error: float, period: float = None)[source]

Bases: object

A single (or periodic) transit.

t0

Mid-transit time in days (BJD or whichever epoch the input used).

Type:

float

duration

Transit duration in days.

Type:

float

depth

Transit depth as a fraction of the baseline flux.

Type:

float

depth_error

Uncertainty on the transit depth.

Type:

float

period

Orbital period in days. None for single-transit candidates.

Type:

float or None

Notes

The signal-to-noise ratio is depth / depth_error and is shown by repr.

copy() Transit[source]

Return a copy of this Transit instance

Return type:

A copy of this Transit instance

depth: float
depth_error: float
duration: float
period: float = None
t0: float
class cetra.LinearResult(light_curve: LightCurve, transit_model: TransitModel, duration_array: ndarray, t0_array: ndarray, like_ratio_array: ndarray, depth_array: ndarray, depth_variance_array: ndarray)[source]

Bases: object

Output of TransitDetector.linear_search().

Holds the 2-D likelihood, depth, and depth-variance arrays over the (duration, t0) grid, plus references to the light curve and transit model that produced them.

light_curve

The light curve used in the search.

Type:

LightCurve

transit_model

The transit model used in the search.

Type:

TransitModel

duration_array

1-D array of tested transit durations in days, shape (n_durations,).

Type:

ndarray

t0_array

1-D array of tested mid-transit times in days, shape (n_t0,).

Type:

ndarray

like_ratio_array

2-D likelihood ratio (vs. constant flux) array, shape (n_durations, n_t0).

Type:

ndarray

depth_array

2-D best-fit depth array, shape (n_durations, n_t0).

Type:

ndarray

depth_variance_array

2-D depth variance array, shape (n_durations, n_t0).

Type:

ndarray

copy() LinearResult[source]

Return a copy of this LinearResult instance

Return type:

A copy of this LinearResult instance

depth_array: ndarray
depth_variance_array: ndarray
duration_array: ndarray
get_max_likelihood_parameters()[source]

Return the parameters of the maximum likelihood TCE

Return type:

The maximum likelihood TCE as a Transit object.

get_max_snr_parameters(absolute_depth=False)[source]

Return the parameters of the maximum SNR TCE

Parameters:

absolute_depth (bool, optional) – If True, computes SNR as abs(S/N), otherwise SNR is S/N. False by default.

Return type:

The maximum SNR TCE as a Transit object.

get_params(duration_index: int, t0_index: int) Transit[source]

Find the parameters of a TCE given duration and t0 indices

Parameters:
  • duration_index (int) – Duration index

  • t0_index (int) – t0 index

Return type:

The corresponding TCE as a Transit object

light_curve: LightCurve
like_ratio_array: ndarray
t0_array: ndarray
transit_model: TransitModel
class cetra.PeriodicResult(linear_result: LinearResult, period_array: ndarray, like_ratio_array: ndarray, depth_array: ndarray, depth_variance_array: ndarray, duration_index_array: ndarray, t0_index_array: ndarray)[source]

Bases: object

Output of TransitDetector.period_search().

Holds the 1-D periodogram arrays and a reference to the LinearResult from which it was derived.

linear_result

The linear search result used to produce this periodogram.

Type:

LinearResult

period_array

Tested orbital periods in days, shape (n_periods,).

Type:

ndarray

like_ratio_array

Joint likelihood ratio for each period, shape (n_periods,).

Type:

ndarray

depth_array

Best-fit depth at each period, shape (n_periods,).

Type:

ndarray

depth_variance_array

Depth variance at each period, shape (n_periods,).

Type:

ndarray

duration_index_array

Index into duration_array of the best-fit duration at each period, shape (n_periods,).

Type:

ndarray

t0_index_array

Index into t0_array of the best-fit t0 at each period, shape (n_periods,).

Type:

ndarray

light_curve

Convenience reference to linear_result.light_curve.

Type:

LightCurve

transit_model

Convenience reference to linear_result.transit_model.

Type:

TransitModel

duration_array

Convenience reference to linear_result.duration_array.

Type:

ndarray

t0_array

Convenience reference to linear_result.t0_array.

Type:

ndarray

copy() PeriodicResult[source]

Return a copy of this PeriodicResult instance

Return type:

A copy of this PeriodicResult instance

depth_array: ndarray
depth_variance_array: ndarray
duration_index_array: ndarray
get_max_likelihood_parameters()[source]

Return the parameters of the maximum likelihood TCE

Return type:

The maximum likelihood TCE as a Transit object.

get_max_snr_parameters(absolute_depth=False)[source]

Return the parameters of the maximum SNR TCE

Parameters:

absolute_depth (bool, optional) – If True, computes SNR as abs(S/N), otherwise SNR is S/N. False by default.

Return type:

The maximum SNR TCE as a Transit object.

get_params(period_index: int) Transit[source]

Find the parameters of a TCE given a period index

Parameters:

period_index (int) – The period index

Return type:

The corresponding TCE as a Transit object

like_ratio_array: ndarray
linear_result: LinearResult
period_array: ndarray
t0_index_array: ndarray

Utility functions

cetra.concatenate_lightcurves(lc_list: list[LightCurve], resample_cadence: float | None = None) LightCurve[source]

Concatenate multiple LightCurve objects to produce a single LightCurve object. If LightCurves overlap in time space their trends will be lost. If this is the case, it’s recommended that their trends are instead subtracted by the user before generating a new LightCurve instance. (Note: Any existing transit masks will be lost, it’s recommended to remask again using the Transit objects.)

Parameters:
  • lc_list (array-like) – Array of LightCurve objects.

  • resample_cadence (float, optional) – The cadence (in seconds) to use for resampling the light curve. By default, the cadence of the first listed light curve will be used.

Return type:

A new LightCurve instance.

cetra.cetra.duration_grid(durations: ndarray | None = None, min_duration: float = 0.02, max_duration: float = 1.0, log_step: float = 1.1, verbose: bool = True) ndarray[source]

Validate or generate the duration grid

Parameters:
  • durations (array-like, optional) – User-specified grid of durations in days. If not provided, the module computes a grid using the minimum and maximum durations and the log step.

  • min_duration (float, optional) – Minimum transit duration to check in days, default 0.02.

  • max_duration (float, optional) – Maximum transit duration to check in days, default 1.0.

  • log_step (float, optional) – The log-spacing of the durations to be used if the duration grid is to be internally determined. Default 1.1.

  • verbose (bool, optional) – If True (the default), reports various messages.

Return type:

The validated duration grid

cetra.cetra.period_grid(epoch_baseline: float, min_period: float = 0.0, max_period: float = inf, n_transits_min: int = 2, R_star: float = 1.0, M_star: float = 1.0, oversampling_factor: int = 3) ndarray[source]

Generates the optimal period grid. Grabbed this nice code from TLS. Thanks Hippke and Heller!

Original copyright for this code belongs to Michael Hippke, it was published under an MIT license. Some modifications made by L.C. Smith.

Parameters:
  • epoch_baseline (float) – The length of the light curve in days.

  • min_period (float, optional) – The minimum period to consider. Set to 0.0 for no lower limit, which in practice means it’s limited by the astrophysics (or the sampling cadence), this is the default setting.

  • max_period (float, optional) – The maximum period to consider. Set to inf for no upper limit, which in practice means it’s limited by the light curve duration and the minimum number of required transits, this is the default setting.

  • n_transits_min (int, optional) – The minimum number of transits that must have coverage. This parameter impacts the period grid, in that the maximum period is limited to the epoch baseline divided by n_transits_min. The default requirement is that there are 2 transits.

  • R_star (float, optional) – The stellar radius (in solar radii) to use, default 1.0.

  • M_star (float, optional) – The stellar mass (in solar masses) to use, default 1.0.

  • oversampling_factor (int, optional) – Oversample the period grid by this factor, default 3. Increasing this improves detection efficiency but at a higher computational cost.

Returns:

P_days – Period grid in days

Return type:

ndarray