mark_transit_cadences

exovetter.utils.mark_transit_cadences(time, period_days, epoch_bkjd, duration_days, num_durations=1, flags=None)[source]

Create a logical array indicating which cadences are affected by a transit.

Parameters:
timearray_like

Numpy 1D array of cadence times.

period_daysfloat

Transit period in days.

epoch_bkjdfloat

Transit epoch.

duration_daysfloat

Duration of transit (start to finish). If you select a duration from first to last contact, all cadences affected by transit are selected. If you only select 2 to 3 contacts, only the interior region of the transit is selected.

num_durationsint

How much of the lightcurve on either side of the transit to mark. Default means to mark 1/2 the transit duration on either side of the transit center.

flagsarray_like or None

If set, must be an array of booleans of length time. Cadences where this array is True are ignored in the calculation. This is useful if some of the entries of time are NaN.

Returns:
idxarray_like

Array of booleans with the same length as time. Element set to True are affected by transits.

Raises:
ValueError

Invalid input.