Quickstart

This page shows the minimal steps needed to detect a transit signal. For a worked example on real TESS data see the notebooks in the examples/ directory of the repository.

Loading a light curve

Pass time (days), flux, and flux error arrays to LightCurve. Flux values should be normalised to a baseline of 1.0.

import numpy as np
from cetra import LightCurve, TransitDetector

lc = LightCurve(times, fluxes, flux_errors)

CETRA resamples the input data onto a uniform cadence using a GPU kernel. Any cadence gaps are filled with null points (infinite error) so that array indexing can be used instead of time lookups during the search.

Extracting multiple signals

Use the iterative extraction methods to find all signals above a given SNR threshold. Each signal is masked out before the next search, then the original light curve is restored.

# single transits above SNR 7
transits = detector.get_single_transits_above_snr_threshold(snr=7.0)

# periodic transits above SNR 7
transits = detector.get_periodic_transits_above_snr_threshold(snr=7.0)

Using a different transit model

Three built-in limb-darkened models are available at impact parameters b = 0.32, 0.93 and 0.99:

from cetra import TransitModel

model = TransitModel('b93')
detector = TransitDetector(lc, transit_model=model)

A custom 1-D array can also be passed directly to TransitModel.