This project tests the Tychos model's ability to predict historical solar and lunar eclipses. For each eclipse in NASA's authoritative catalogs, it computes Sun and Moon positions in both the Tychos geometric model and the standard JPL ephemeris, derives a predicted reference geometry directly from the catalog's published gamma and magnitude, and reports each model's angular error against that reference.
-
Get the eclipse catalogs. Parse NASA's Five Millennium Canon of solar and lunar eclipses (1901–2100) into JSON, giving us ~900 eclipses with exact times in Julian Day (TT), plus per-eclipse
gamma, magnitude, and Saros series number. -
Derive a predicted reference geometry. For each catalog eclipse,
server/services/predicted_geometry.pyconverts the published gamma and magnitude into the expected Sun-Moon (or Moon-to-shadow) angular separation and disk/shadow radii — pure geometry, no Skyfield, no Tychos. This becomes the per-eclipse ground-truth reference stored in thepredicted_referencetable. -
Set up two models via Skyfield. Initialize the Tychos geometric model (
tychos_skyfield) and the standard heliocentric model (JPL DE440s ephemeris via Skyfield). Both produce Sun and Moon RA/Dec positions in the ICRF/J2000 frame. -
Scan each model for closest approach. For each catalog eclipse, scan for minimum Sun-Moon separation in the Tychos model around the catalog time, and record the corresponding JPL geometry at the same instant.
-
Score against the predicted reference. Compute
tychos_error_arcminandjpl_error_arcminas the angular distance between each model's predicted Sun-Moon separation and the catalog-derived reference separation. There is no pass/fail — the metric is continuous. -
Store and visualize. Results go into a SQLite database. The admin dashboard provides per-eclipse geometry diagrams (predicted / tychos / jpl side-by-side), error-based filtering, Saros-series grouping, and dataset browsing.
| Doc | Topic |
|---|---|
| Methodology | Predicted reference geometry, eclipse detection scan, error metrics |
| Datasets | NASA Five Millennium Canon catalogs and JPL DE440s ephemeris |
| Architecture & Dependencies | tychos_skyfield, Skyfield, NumPy, SciPy, FastAPI |
| Visualizations & Dashboard | Eclipse diagrams, Saros analysis, admin UI walkthrough |
| Roadmap | Open questions and future goals |
Local development (FastAPI server + worker + admin SPA dev server):
git clone --recurse-submodules https://github.com/the-real-adammork/tychos.git
cd tychos
python3 -m venv tychos_skyfield/.venv
source tychos_skyfield/.venv/bin/activate
pip install -r server/requirements.txt -r tychos_skyfield/requirements.txt -r requirements.txt
(cd admin && npm install)
# First boot only — required to seed the initial admin user
export TYCHOS_ADMIN_USER=you@example.com
export TYCHOS_ADMIN_PASSWORD='something-strong'
./dev.shThis starts the API at http://localhost:8000, the admin UI at http://localhost:5173, and the background worker. Hit /login with the credentials you exported above. The first boot runs migrations, downloads de440s.bsp, parses the NASA catalogs, derives the predicted reference geometry, and queues the seeded parameter sets for runs — give it a minute.
For deploying as a long-lived service behind Cloudflare Tunnel + Access, see local_deploy/README.md.
⚠️ The bare API server has open registration and no built-in access control. It's only safe to expose publicly behind an external auth gate. The local deploy uses Cloudflare Access with an email allowlist.
| Path | What it is |
|---|---|
server/ |
FastAPI backend, SQLite migrations, the background worker, and the eclipse scanner |
admin/ |
React + Vite single-page admin UI |
tests/ |
Pytest suite for the scanner, predicted geometry, and helper math |
tychos_skyfield/ |
Submodule — the Python implementation of the Tychos model |
scripts/ |
One-off scripts (currently just the NASA catalog parser) |
local_deploy/ |
Cloudflare Tunnel + Access deploy scripts and launchd plists |
params/ |
On-disk parameter sets that get seeded into the database on first boot |
docs/ |
Methodology, architecture, datasets, visualizations, and roadmap |
GPL v2. See LICENSE. The tychos_skyfield submodule is also GPL v2.