Finding planets in starlight
A pipeline that searches TESS light curves for the small, repeating dip of a transiting planet and decides whether it is one. Judged on 766 real TESS candidates that follow-up has since resolved, it ranks the confirmed planets above the false positives with an average precision of 0.84, where guessing scores 0.49. A version trained only on simulated planets scored 0.61, barely better than ranking by signal strength.
The problem
A planet crossing in front of its star dims the light by 0.05 to 1% for a few hours, once per orbit. Only a few per cent of stars host one that can be seen, and the dip sits on top of stellar variability ten to a hundred times deeper. Most dips that do repeat are not planets: eclipsing binaries, a binary on a neighbouring star blended into the same pixel, or the spacecraft itself. Every candidate a pipeline flags costs nights of telescope time to check, so what matters is how cleanly the real planets rise to the top of the list.
How it works
Each light curve is flattened with a robust spline that is shown to keep a transit's depth to within 5% while removing variability ten times deeper, then refitted with the transits masked. A box least squares search finds the strongest repeating dip. The classifier, gradient boosting on 23 vetting measurements (odd against even transit depths, a search for a secondary eclipse, transit shape, how much the dip stands out from the rest of the periodogram), scores how planet-like the signal is. A centroid test checks the pixel images to see whether the dip is on the target star or a neighbour. For candidates worth a closer look, a limb-darkened transit model is fitted with MCMC to give the planet's size, impact parameter and the stellar density the transit implies.
The same code vets one star (python -m transitml.vet "TIC 100100827", which is WASP-18) or a whole sector with a cache and a ranked dashboard.
On real TESS data
The test that matters is the one a vetting tool faces in use: real TESS signals that follow-up observers have since resolved as confirmed planet or false positive, labels nobody in this project chose. Both classes have already passed TESS's own detection and automated vetting, so the false positives are the hard ones that got through.
| Test on real data | Result | Chance |
|---|---|---|
| 746 resolved TOIs, model trained on synthetic curves | AP 0.61 | 0.50 |
| ranking the same stars by BLS SNR | AP 0.60 | 0.50 |
| 766 hosts of sectors 14 to 26, trained on 1 to 13 | AP 0.842 | 0.491 |
| 857 hosts of sectors 1 to 13, trained on 14 to 26 | AP 0.876 | 0.536 |
| 101 open TOIs since confirmed, among 1,856 ranked | ROC-AUC 0.63 | 0.50 |
| Synthetic planets injected into real sector 14 noise | AP 0.46 | 0.04 |
- A model that only saw simulated planets did not transfer. Trained on synthetic light curves it scored 0.61 on real TOIs, against 0.60 for simply ranking by signal-to-noise. On that population it was mostly a signal-strength ranking. That result is why the later models learn from real follow-up labels instead, trained on one half of the TESS mission and scored on the other.
- More data per star helps the most. Joining each star's later sectors finds the catalogued period for 88% of hosts instead of 81%, and is worth 0.04 to 0.07 of average precision. The centroid test adds a little more by catching dips that sit on a neighbouring star.
- The open candidates. Turned on 1,856 TOIs still awaiting a verdict, the model ranks the 101 that the NASA Exoplanet Archive has since confirmed above the rest with a ROC-AUC of 0.63, against 0.51 for the TOI's own signal-to-noise. None of them was in training. The other open TOIs still hold many planets, so 0.63 is a floor on the separation.
- Fitted sizes hold up. Fifteen known TESS planets, each fitted from one sector, put 69% of their radius, impact, duration and density values within one sigma of the published ones and 95% within three, close to what honest intervals should give. LHS 3844 b, on an 11-hour orbit, was found at twice its period because the search grid starts at half a day.
- Real noise is much harder than the simulator. Planets injected into real sector 14 photometry drop average precision from 0.74 on synthetic data to 0.46.
What these numbers do not say: the follow-up labels carry the follow-up programme's own choices, and about half of TOIs are planets, far more than in the sky. So the 0.8s measure how well the model ranks TOIs like the resolved ones, not the precision of a survey.
The synthetic benchmark
Before any real data, the pipeline was built against 2,400 simulated light curves in which 4% of stars host a transiting planet, with eclipsing binaries and variable stars as the false positives and 35% held out. Here the truth is known for every star.
| Scorer | Average precision | ROC-AUC | Top 20 |
|---|---|---|---|
| Random ranking (chance) | 0.040 | 0.500 | |
| Rank by BLS depth | 0.097 | 0.752 | 0 of 20 |
| Rank by BLS depth SNR | 0.179 | 0.831 | 2 of 20 |
| Gradient boosting on vetting features | 0.745 | 0.921 | 18 of 20 |
- Accuracy is never computed. At a 4% planet rate, a classifier that always says "no planet" is 96% accurate and finds nothing. Average precision, quoted against its own chance level, is the headline, because precision has the number of flagged stars in its denominator, and that is what turns into telescope nights.
- The threshold is chosen inside the training split, as the highest-recall point whose cross-validated precision is at least 0.50 at a one-sided lower confidence bound, then frozen. The first version applied the 0.50 floor to the point estimate and delivered 0.41 on held-out data; the confidence bound fixed that selection bias.
- One test set is one draw. On three fresh simulated sectors the model never saw, average precision was 0.62, 0.73 and 0.59. With 34 planets in the test set, the third decimal of 0.745 means nothing.
Reproduce it
git clone https://github.com/rohanKraghu/transit-detection && cd transit-detection pip install -r requirements.txt python run_pipeline.py # the synthetic benchmark, about 3 minutes on 4 cores pytest # 574 tests
The real-data runs download thousands of light curves from MAST through lightkurve, which takes hours the first time; the README gives the command for each result above. Numbers on this page are from the README at commit 8f0c69f (21 October 2026).
Limits
- Catalogue labels, not the sky. Every real benchmark here scores TOIs, which a TESS pipeline already chose, at about a 50% planet rate. Recall on confirmed planets and the share of false positives rejected transfer to other populations; precision does not.
- The brightest stars only. Rankings read TESS-SPOC photometry, which covers about half the open TOI hosts. The fainter half is filled in from QLP photometry with a separate option.
- Long periods are hard. A planet that transits once or twice in a 27-day sector is often missed by the search before the classifier ever sees it. Joining later sectors recovers many of these, not all.
- Small labelled sets. With a few hundred stars on each side, average precision moves by a few points from one split to another, so differences under about 0.03 are noise.