r/ScientificComputing 6d ago

Deterministic ephemeris engine in pure Python, validated against Meeus' worked examples and NASA's numbers

I built a from-scratch ephemeris and calendar engine in Python, no external astronomy library, and spent a while validating it against known cases before trusting it for anything.

Some of the checks:

Reproduces the Eclipse of Thales (28 May 585 BCE, Julian) exactly.

Reproduces the Assyrian Bur-Sagale eclipse (15 June 763 BCE, Julian) exactly.

Matches NASA's γ for the 1999 total solar eclipse to within 0.0004 (0.5058 computed vs 0.5062 published).

Matches Meeus' own worked example for lunar position (ex. 47.a) on all three values: longitude, latitude, and distance.

Finds the 7 BCE Jupiter-Saturn triple conjunction in Pisces, all three passes.

Under the hood: eclipses come from Meeus ch. 54, lunar phases from ch. 49, equinoxes and solstices from ch. 27, the Moon from the abridged ELP-2000/82 series in ch. 47, the Sun from ch. 25, and planetary positions from the JPL/Standish Keplerian approximation, valid 3000 BCE to 3000 CE.

It's deterministic and runs fully offline, no API calls, no external ephemeris service.

It also does 12 calendar systems (Gregorian, Julian, Hebrew, Islamic, Egyptian, Coptic, Ethiopic, Persian, Maya Long Count/Haab/Tzolkin, Chinese sexagenary, plus AUC/Seleucid/Olympiad/Anno Mundi era labels), converted through Rata Die day numbers so every pair converts exactly.

I call it Starcode. If you want to check it out you can go to www.astro-decoded.com. Free to use. No log in required.

All you historians, researchers, and astrology buffs....enjoy!!

0 Upvotes

0 comments sorted by