star-moon 0.1.0
Where the Moon is, to about 0.4 degree (0.2 degree for 95 % of dates)
Public state: Released & Verified. The registry label is RELEASED. What the states mean →
Apache-2.0 Released & Verified single file
Summary
Geocentric Moon position for 1950-2050 from the Astronomical Almanac series; measured within 0.36 deg and 1200 km of JPL DE440 over 2002 dates, with the same envelope against astropy and PyEphem.
Run in your browser
Edit the code and press Run (or Ctrl+Enter). Python runs in your browser with this package's published code. The first run downloads Python once (about 12 MB).
Runs in the browser: all 14 tests pass in the browser's Python (Pyodide 314.0.7, Python 3.14.2), measured on 20 October 2026.
Use it on your computer
No account and no GitHub needed. Download, then install with one command:
- Install file · star_moon-0.1.0-py3-none-any.whl 3 kB
- Single file — copy it alongside your code · star_moon.py 4 kB
- Source code (.zip) 17 kB
python -m pip install star_moon-0.1.0-py3-none-any.whlIn Python: import star_moon
Cite it, and its bill of materials
For a paper, a report or a supplier file: the citation in two formats, and the software bill of materials (SBOM) in the two standard formats, with the fingerprint of the wheel.
@software{cavazzini_star_moon_0_1_0,
author = {Cavazzini, Andrea},
title = {{star-moon}: Where the Moon is, to about 0.4 degree (0.2 degree for 95 % of dates)},
version = {0.1.0},
year = {2026},
url = {https://andrea07072000.github.io/S.T.A.R.-/software/star_moon/},
note = {Apache-2.0. Source: https://github.com/Andrea07072000/S.T.A.R.-, commit dc09f61d}
}
For developers
Install directly from the public repository:
python -m pip install "star-moon @ git+https://github.com/Andrea07072000/S.T.A.R.-.git@dc09f61dcee098d518f070d6a23a8815defc1109#subdirectory=packages/star_moon"
Technical sheet
Requirements
- R1
moon_vector_km(jd_day, jd_frac=0),moon_ra_dec_deg,moon_distance_kmfor Julian dates (TDB) from 1950-01-01 to 2050-01-01; outside,ValueError. Reproduces Vallado Example 5-3 within 0.4 m. - R2 Measured accuracy of the series (2002 dates, three ephemerides): direction within 0.36 deg of JPL DE440 (95 % of the dates within 0.20 deg), distance within 1200 km (288 km on average). astropy and PyEphem give the same envelope.
- R3 Frame: mean equator and equinox of DATE, like
star_sun; rotate before mixing with J2000/GCRF vectors. - R4 Every function returns finite floats or raises
ValueError: non-numeric, boolean, NaN or infinite input, a date outside 1950-2050.
Limits (what is not claimed)
Not an ephemeris: 0.36 deg is about 2300 km at the Moon's distance. Good for eclipse and illumination geometry, third-body direction and visibility planning; not for navigation, occultation timing or tide-accurate work.
Release gate
Computed by the registry from the result files, with the same function that decides RELEASED.
- Mutation score, latest measure of each module (needs at least 0.850)
- star_moon.py 0.967 (2026-10-06)
- Independent implementations written by others (needs 2)
- astropy get_body (built-in analytical ephemeris), JPL DE440 through NAIF CSPICE (numerical integration), PyEphem libastro
- Also compared with, not counted
- published values: Vallado Example 5-3 printed values
- Result
- Released & Verified
Evidence in the registry
| Check | Status | Recorded | What was observed |
|---|---|---|---|
| Unit tests | VERIFIED | 2026-10-06 | 14 passed in 1.00s |
| Review | VERIFIED | 2026-10-06 | Requirements, interface, units, data provenance, dependency surface and failure behaviour reviewed |
| Review | VERIFIED | 2026-10-06 | Re-running the cross-check gives a byte-identical evidence file |
| Reference value | VERIFIED | 2026-10-06 | each component within 3.6e-4 km of the printed values (suite: 14 passed in 1.00s) |
| Cross-check with independent libraries | VERIFIED | 2026-10-06 | star_moon stays within the accuracy stated for the Almanac series against three independent ephemerides, 1950-2050 |
| Benchmark | VERIFIED | 2026-10-06 | measured accuracy of the series by ephemeris: spice_de440: max 0.359 deg, 95 % within 0.196 deg, distance max 1194 km, mean 288 km; astropy: max 0.361 deg, 95 % within 0.196 deg, distance max 1232 km, mean 288 km; ephem: max 0.350 deg, 95 % within 0.199 deg, distance max 1200 km, mean 288 km |
| Clean install from the release tag | VERIFIED | 2026-10-06 | pytest outside the tree: 14 passed in 0.73s |
Fingerprints (SHA-256)
| star_moon-0.1.0-py3-none-any.whl | e66320c7d8fbca26babb6270cc43cabd9daf12f1b207179f3dba8f33a3378aa5 |
| star_moon.py | ce41f15b68f4841d07880ec30babf3cb98a4e8c80bdb0ec867b6f6a0872cd769 |
| star_moon-0.1.0-source.zip | 27e2e2b6a63470b5a39ce9e4158dad977101668b9210c997dda41031dce7c4e1 |
