A compact frozen-coefficient semi-analytical planetary and lunar ephemeris
Project description
Taiyin Semi-Analytical Ephemeris
A frozen-coefficient semi-analytical ephemeris covering calendar years
−3000 through +3000. It has no runtime data files, uses only the Python
standard library, and is published as taiyin-ephemeris-semi-analytic.
- Mercury through Pluto and the Earth–Moon barycenter use compact series independently fitted to JPL DE441.
- Planetary harmonics are generated from one sine/cosine pair per fundamental angle, so periodic terms require only multiplication and addition.
- The Moon uses the truncated XL1 lunar theory table from Shouxing Astronomical Ephemeris (寿星天文历/寿星万年历), followed by an independently fitted DE441 residual correction.
- Earth and Moon heliocentric positions are reconstructed from the EMB and the geocentric lunar vector.
Command line
The input epoch is Julian Date on the TDB time scale:
pip install taiyin-ephemeris-semi-analytic
taiyin-semi-analytic 2451545.0 301
From a source checkout, the original one-file-style demo command remains:
python3 ephemeris.py 2451545.0 301
The command prints JSON containing:
xyz_km: heliocentric ICRF Cartesian coordinates in kilometres;spherical_icrf_rad_km: spherical longitude, latitude and radius derived from that same ICRF vector, in radians, radians and kilometres;ecliptic_lbr_j2000_rad_km: J2000 ecliptic longitude, latitude and radius, in radians, radians and kilometres;- explicit target, center and frame metadata.
Python API
from taiyin_semi_analytic import (
ecliptic_lbr_j2000,
position,
result,
spherical_icrf,
)
xyz = position(2451545.0, 4) # Mars
icrf_spherical = spherical_icrf(2451545.0, 4)
ecliptic_lbr = ecliptic_lbr_j2000(2451545.0, 4)
record = result(2451545.0, 4)
Both spherical functions return (longitude, latitude, radius). Angles are
in radians and radius is in kilometres. spherical_icrf() uses the ICRF axes;
ecliptic_lbr_j2000() returns the conventional L/B/R coordinates referred to
the J2000 mean ecliptic and equinox.
Supported target IDs:
| ID | Target |
|---|---|
| 1 | Mercury |
| 2 | Venus |
| 3 | Earth–Moon barycenter |
| 4 | Mars |
| 5 | Jupiter system barycenter |
| 6 | Saturn system barycenter |
| 7 | Uranus system barycenter |
| 8 | Neptune system barycenter |
| 9 | Pluto system barycenter |
| 10 | Sun |
| 301 | Moon |
| 399 | Earth |
All returned vectors are Sun-centered. IDs 301 and 399 are therefore also heliocentric, not geocentric.
Accuracy
Held-out validation against DE441 over calendar years −3000 through +3000 gave the following heliocentric angular RMS values for the frozen planetary series:
| Target | RMS |
|---|---|
| Mercury | 1.66″ |
| Venus | 0.66″ |
| EMB | 0.56″ |
| Mars | 2.29″ |
| Jupiter | 3.31″ |
| Saturn | 0.29″ |
| Uranus | 3.65″ |
| Neptune | 0.21″ |
| Pluto | 1.53″ |
The corrected geocentric lunar model measured 0.704″ angular RMS and 0.263 km radial RMS on held-out 32-day-grid epochs; maximum errors on that grid were 5.22″ and 1.52 km.
Design lineage
Steve Moshier's PLAN404 was an important inspiration for the compact semi-analytical representation and harmonic-recursion evaluator used here. The planetary series were developed by fitting to JPL DE441.
The lunar ecliptic-of-date coordinates are rotated to the J2000 ecliptic with the published P03 precession model of Capitaine, Wallace, and Chapront.
Files
taiyin_semi_analytic/core.py: evaluator and public implementation.taiyin_semi_analytic/coefficients.py: frozen coefficients.taiyin_semi_analytic/__main__.py:python -m taiyin_semi_analyticentry.ephemeris.py: source-tree command-line demo wrapper.pyproject.toml: wheel/sdist and console-script configuration.tests/test_ephemeris.py: standard-library regression tests.NOTICE: attribution and third-party provenance.
The project is licensed under Apache License 2.0. The attributed Shouxing
lunar table retains its upstream provenance notice; see NOTICE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file taiyin_ephemeris_semi_analytic-0.1.0.tar.gz.
File metadata
- Download URL: taiyin_ephemeris_semi_analytic-0.1.0.tar.gz
- Upload date:
- Size: 184.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3eb003d3bca0f36c76235623caa7f735ac489e33352a87f78e530cee419996c5
|
|
| MD5 |
3f878e7aabc4bce20acadbf3404057a2
|
|
| BLAKE2b-256 |
1050bfcd97ea4291a1d6b650a9a94cfc19f6b453a090fa2007843c006d67dfc9
|
Provenance
The following attestation bundles were made for taiyin_ephemeris_semi_analytic-0.1.0.tar.gz:
Publisher:
release.yml on RedSC1/taiyin-ephemeris-semi-analytic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taiyin_ephemeris_semi_analytic-0.1.0.tar.gz -
Subject digest:
3eb003d3bca0f36c76235623caa7f735ac489e33352a87f78e530cee419996c5 - Sigstore transparency entry: 2211110426
- Sigstore integration time:
-
Permalink:
RedSC1/taiyin-ephemeris-semi-analytic@27d33df2089ee1213a13a68782d5eff4ca2b2681 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/RedSC1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@27d33df2089ee1213a13a68782d5eff4ca2b2681 -
Trigger Event:
release
-
Statement type:
File details
Details for the file taiyin_ephemeris_semi_analytic-0.1.0-py3-none-any.whl.
File metadata
- Download URL: taiyin_ephemeris_semi_analytic-0.1.0-py3-none-any.whl
- Upload date:
- Size: 188.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f0605087a690df539b4808aef6f08c14ba5a2dc5c4a5c2b0ce91168ae240759
|
|
| MD5 |
b44ea335c700a3a68c5c09acc2860909
|
|
| BLAKE2b-256 |
d70c6455bba5e85ba31c7832b50ef41ed1f14e1a06a609822c0396031b6c5a8c
|
Provenance
The following attestation bundles were made for taiyin_ephemeris_semi_analytic-0.1.0-py3-none-any.whl:
Publisher:
release.yml on RedSC1/taiyin-ephemeris-semi-analytic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taiyin_ephemeris_semi_analytic-0.1.0-py3-none-any.whl -
Subject digest:
4f0605087a690df539b4808aef6f08c14ba5a2dc5c4a5c2b0ce91168ae240759 - Sigstore transparency entry: 2211110459
- Sigstore integration time:
-
Permalink:
RedSC1/taiyin-ephemeris-semi-analytic@27d33df2089ee1213a13a68782d5eff4ca2b2681 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/RedSC1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@27d33df2089ee1213a13a68782d5eff4ca2b2681 -
Trigger Event:
release
-
Statement type: