Foundations to Frontier
Tests
J. Scientific Machine Learning › J9 Scientific ML in Space Science

Finding exoplanets in light curves

When a planet crosses its star it blocks a tiny fraction of the light, a few hundred parts per million for a planet like Neptune. Missions such as Kepler and TESS find planets by searching millions of light curves for such periodic dips. This page simulates 40-day light curves with spotted, variable stars, removes the variability, searches for transits with box least squares, sets a detection threshold from planet-free stars, and then separates real planets from eclipsing binaries, which mimic them, with a logistic vetting classifier.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Planets that dim their stars

If a planet’s orbit is lined up with our view, it passes in front of its star once per orbit and the star dims slightly for a few hours. Measure the star’s brightness for weeks, look for dips that repeat at a fixed period, and you have found a planet candidate. The depth of the dip gives the planet’s size, and the spacing gives its orbital period. The hard part is that stars flicker on their own, and some pairs of stars eclipse each other in ways that look like planets.

Space science lab
40 days at 30-minute cadence, folded at P = 4.7 d (hours from mid-transit, light points; dark points: half-hour bins). 9 transits of 3.0 h give 56 in-transit points and SNR = δ√n/σ = 10.0, above Kepler's 7.1σ threshold. Longer periods mean fewer transits and lower SNR.
Why engineers care

Kepler found about 2,700 confirmed planets by the transit method, and TESS has found hundreds more and thousands of candidates.

📝 Quick check (Level 0)
0/3 answered
  1. 1. A transit is seen when a planet…
  2. 2. The depth of a transit tells us the planet's…
  3. 3. False positives often come from…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Depth: a planet of radius Rp in front of a star of radius Rs blocks (Rp/Rs)² of the light. Earth on the Sun: 84 ppm; Jupiter: 1%.
  • Duration: a few hours, roughly 13 h × (P / 1 yr)^(1/3) for a central transit of a Sun-like star.
  • Detrending: stars vary by thousandths through spots and rotation over days. Removing variability slower than a transit (median filters, splines, Gaussian processes) is needed before searching.
  • Box least squares (BLS): fold the light curve at each trial period and fit a box-shaped dip. The best box gives the period, epoch, duration and depth.
  • Thresholds: searching thousands of periods produces large noise peaks, so the threshold must come from the maximum over the search, calibrated on planet-free data. Kepler used 7.1σ.
  • Vetting: eclipsing binaries show odd/even depth differences, secondary eclipses and V-shaped dips. Classifiers such as Robovetter, Autovetter and Astronet (a CNN) separate them from planets.
📝 Quick check (Level 1)
0/3 answered
  1. 1. Depth of a transit with Rp/Rs = 0.1:
  2. 2. BLS fits…
  3. 3. A sign of an eclipsing binary:

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

Detrending and BLS

Exercise 1.

  • 40 days at 30-minute cadence (1920 points) with 300 ppm white noise.
  • Two starspot sine waves with amplitudes of 1000–4000 ppm and periods of 5–20 days.
  • A 600 ppm trapezoidal transit at P = 4.7 d.
  • A running median over 49 points (about a day) for detrending.
  • BLS over 1045 trial periods from 2 to 10 d, with boxes of 3, 5 and 8 cadences.

Practice.

  • Detrend with a window longer than the transit, or the transit is partly removed.
  • Space trial periods so that the phase drift over the baseline stays under half a transit duration.
  • Calibrate the threshold on injected and planet-free light curves, not on single-period statistics.
  • Vet every candidate for odd/even differences, secondary eclipses and shape.
  • Tools: lightkurve, astropy BoxLeastSquares, transitleastsquares, wotan for detrending, and batman for transit models.
import numpy as np

def detrend(f, window=49):
    h = window // 2
    g = np.pad(f, h, mode="edge")
    med = np.median(np.lib.stride_tricks.sliding_window_view(g, window), axis=1)
    return f / med - 1
🐍 Exercise 1: finding one planet
Simulate a variable star with a 600 ppm transiting planet, detrend it with a running median and recover the period with box least squares.
📝 Quick check (Level 2)
0/3 answered
  1. 1. The detrending window should be…
  2. 2. A Python package for TESS and Kepler data:
  3. 3. A detection threshold should be calibrated on…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Detection as a matched filter. A box of depth δ covering n points, each with noise σ, has SNR = δ√n/σ. Stacking transits through folding raises n. A 300 ppm dip with 300 ppm noise reaches SNR 7 after 49 in-transit points. In Exercise 1, detrending reduced the scatter from 2231 to 305 ppm. BLS then found P = 4.699 d (true 4.7), a duration of 2.5 h (true 3.0 h) and SNR 9.8.

The look-elsewhere effect. BLS takes the maximum over about a thousand periods, many epochs and three widths. Even pure noise therefore gives a maximum SNR near 5. The threshold must be set from the distribution of this maximum on planet-free stars, which is an empirical false-alarm calibration.

Vetting features. Fold at the found ephemeris and measure three things:

  • the odd–even depth difference, divided by its standard error σ√(1/n_odd + 1/n_even);
  • the depth at phase 0.5, a secondary eclipse;
  • the ratio of the central depth to the mean depth, which is larger for V-shaped dips.

A diluted binary can match a planet’s depth, but rarely all three features at once.

📝 Quick check (Level 3)
0/3 answered
  1. 1. SNR of a box with depth δ over n points of noise σ:
  2. 2. Noise alone gives large maximum SNRs because…
  3. 3. The odd–even difference is scaled by…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

How deep must a transit be to be found in 40 days of data from a variable star, what does skipping detrending cost, and how well can simple features separate planets from eclipsing binaries?

History.

  • O. Struve (1952) proposed searching for planets by transits.
  • D. Charbonneau et al. and G. Henry et al. (2000) observed the first transits, of HD 209458 b.
  • G. Kovács, S. Zucker and T. Mazeh (2002) introduced box least squares.
  • Kepler (2009–2018) and TESS (from 2018) searched hundreds of thousands of stars. C. Shallue and A. Vanderburg (2018) vetted Kepler candidates with a CNN.

Exercise 2.

  • The detection threshold is the largest BLS SNR among 6 planet-free stars, computed separately for detrended and raw light curves.
  • 6 stars with planets are simulated at each of three depths. A planet counts as recovered if its SNR passes the threshold at the true period, half of it or twice it.
  • For vetting, a logistic regression on the three features is trained on 80 planets and 80 diluted eclipsing binaries, with overlapping depths and shapes, and tested on 50 + 50 new systems.

Seed 0:

detection value
threshold, detrended / raw 5.0 / 6.6
recovered at 150 / 300 / 600 ppm 0.0 / 0.67 / 1.0
recovered at 600 ppm without detrending 0.0
vetting accuracy planets rejected binaries passed
all three features 0.95 0.04 0.06

Single features alone: odd–even 0.79, secondary eclipse 0.86, V-shape 0.85.

  • Without detrending even 600 ppm transits were lost: the starspot variability is several times larger than the transit.
  • Recovery rose steeply between 150 and 600 ppm, as expected from SNR ∝ depth.
  • Combining features beat every single feature. Each catches different binaries.
  • Seeds 1 and 2:
    • thresholds 4.9 / 6.6 and 5.3 / 7.4;
    • recovery 0 / 0.67 / 1.0 in both, raw 0 in both;
    • vetting accuracy 0.95 and 0.96, planets rejected 0.08 and 0.0, binaries passed 0.02 and 0.08.
🐍 Exercise 2 (research): how deep must a transit be to be found in 40 days of data from a variable star, what does skipping detrending cost, and how well can simple features separate planets from eclipsing binaries?
Find the detection threshold from planet-free stars, measure planet recovery at three depths with and without detrending, and train a logistic vetting classifier to separate planets from eclipsing binaries.

Transit searches in practice

  • Pipelines: the Kepler and TESS Science Processing Operations Center pipelines use wavelet-based matched filters, while the TESS Quick-Look Pipeline uses BLS.
  • Vetting: Robovetter rules, Autovetter random forests, Astronet and ExoMiner neural networks, followed by ground-based follow-up and radial velocities.
  • Injection–recovery tests measure completeness, which population studies of planet occurrence rates need.
  • Next missions: PLATO will search for Earth-like planets around Sun-like stars.

References

  1. G. Kovács, S. Zucker and T. Mazeh (2002). “A box-fitting algorithm in the search for periodic transits.” Astronomy & Astrophysics.
  2. D. Charbonneau, T. M. Brown, D. W. Latham and M. Mayor (2000). “Detection of planetary transits across a Sun-like star.” The Astrophysical Journal.
  3. J. M. Jenkins et al. (2010). “Overview of the Kepler science processing pipeline.” The Astrophysical Journal Letters.
  4. C. J. Shallue and A. Vanderburg (2018). “Identifying exoplanets with deep learning.” The Astronomical Journal.
  5. J. L. Coughlin et al. (2016). “Planetary candidates observed by Kepler. VII. The first fully uniform catalog based on the entire 48-month data set.” The Astrophysical Journal Supplement Series.