Metadata-Version: 2.5
Name: diplo
Version: 0.1.0rc2
Summary: Transit vetting toolkit from the Transit Trials project: search a TESS star for repeating dips and run the vetting tests
Project-URL: Homepage, https://github.com/derek/diplo
Project-URL: Project, https://derek.io/transit-trials/
Project-URL: Source, https://github.com/derek/transit-trials
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.13
Requires-Dist: astropy
Requires-Dist: astroquery
Requires-Dist: batman-package
Requires-Dist: emcee
Requires-Dist: matplotlib
Requires-Dist: numba
Requires-Dist: numba<0.62; sys_platform == 'darwin' and platform_machine == 'x86_64'
Requires-Dist: numpy>=2.1
Requires-Dist: pandas
Requires-Dist: pyarrow
Requires-Dist: pyyaml
Requires-Dist: requests
Requires-Dist: scipy>=1.14
Requires-Dist: setuptools<81
Requires-Dist: triceratops>=1.1
Requires-Dist: wotan
Provides-Extra: leo
Requires-Dist: leo-vetter; extra == 'leo'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

# DIPLO: the Transit Trials toolkit as a stand-alone download

**DIPLO** (**D**ip **I**nvestigation **P**ipeline for **L**ight-curve **O**bservations, after Diplodocus) is the
transit-vetting toolkit of [Transit Trials](https://derek.io/transit-trials/) (`tools/transit`,
[TOOLKIT.md](https://github.com/derek/transit-trials/blob/main/docs/TOOLKIT.md)) packaged so that anyone can
install it and run it on their own computer. Its home is [github.com/derek/diplo](https://github.com/derek/diplo).
**0.1.0rc2 is a release candidate (29 Nov 2026): a test release for install and packaging problems, not for real science yet.**

| Step | What | State |
| --- | --- | --- |
| 1 | Installable package; frozen cutoff files shipped inside it; version stamp without git | done |
| 2 | One command, `diplo`: give it a TIC (and optionally a period), get a folder with an automatic tier, a test table, a TRICERATOPS score, plots, `case.yaml` and a plain report | done |
| 3 | Slow real-star scorecard for steps 1 and 2 | done: identical to the in-repo toolkit on every line (29 Nov) |
| 4 | Downloads kept in a folder on the user's own computer (first version in 0.1.0rc1); one copy of the data-cache code; the project's verdicts table optional | next |
| 5 | Guide for newcomers, a worked example with its expected answer, a fresh-install test | planned |

## Install

```bash
pip install --pre diplo         # Python 3.13 or newer
diplo-setup                     # once: makes TRICERATOPS's pytransit import under numpy 2
diplo TIC38699429              # search a star, test its strongest signal, write diplo-TIC38699429/
diplo TIC278139343 --period 6.2016 --quick   # test a known signal; --quick skips TRICERATOPS
```

DIPLO needs Python 3.13 or newer: below 3.13, TRICERATOPS 1.1 requires numpy 1, so pip would fall back to
TRICERATOPS 1.0.x, which asks the TRILEGAL server for background stars and fails on its security certificate.
A progress bar shows the step running and a rough time left (`--quiet` turns it off; the percentage comes from
typical step times, so treat it as a guide).

The install brings in standard science libraries (numpy, scipy, astropy, numba, batman, TRICERATOPS and
others), about 1 GB in a fresh environment. TRICERATOPS asks for an old version of one of its parts
(pytransit 2.2) that no longer imports with numpy 2; `diplo-setup` edits that installed part so it does,
the same fix the project's own runs use. Without it the false-positive test is *not measured*.
`pip install --pre "diplo[leo]"` adds LEO-Vetter; without it that test is reported as *not measured*.
Downloads are kept in `~/.cache/diplo` and `~/.cache/lccache` (set `LCCACHE_ROOT` and `LCCACHE_BULK` to move them).

Known limits: it reads NASA's SPOC and TESS-SPOC light curves only (a star with only QLP light curves comes
out "not found"), and the automatic tier can sit below a hand-checked tier.

## What is in the package

- `transit`: the search, the vetting tests and the report writer, exactly as the project runs them.
- `gates`, `vetting_gates`, `lccache`: the cheap gates and the data cache the toolkit uses.
- `transit/_calibration`: a copy of the frozen cutoff files in `calibration/`, unchanged
  (`transit.paths.CAL_DIR`). The environment variable `DIPLO_CALIBRATION` can point to another folder.

Not in it: cases, the website, the project's verdicts table, scheduled searches or anything in the project
folder. Nothing is sent anywhere: results stay on the user's computer.

## Rules that still apply

Results are candidates, never planets, and nothing is called "validated". An outage, missing value or
empty input is *not measured*, never a pass. The tier words are those of the project's
[tier ladder](https://github.com/derek/transit-trials/blob/main/docs/PROCESS_GUIDE.md#tier-ladder-27-nov-2026).
