← All packages

Orbits & astrodynamics

star-sun 0.1.0

Sun direction, beta angle and eclipse test

Public state: Released & Verified. The registry label is RELEASED. What the states mean →

Apache-2.0 Released & Verified single file

Summary

Low-precision geocentric Sun vector for 1950-2050 (measured within 0.0097 deg of JPL DE440 apparent), orbit beta angle and cylindrical shadow test; every function returns finite values or raises ValueError.

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 73 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:

python -m pip install star_sun-0.1.0-py3-none-any.whl

In Python: import star_sun

Get started →

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_sun_0_1_0,
  author  = {Cavazzini, Andrea},
  title   = {{star-sun}: Sun direction, beta angle and eclipse test},
  version = {0.1.0},
  year    = {2026},
  url     = {https://andrea07072000.github.io/S.T.A.R.-/software/star_sun/},
  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-sun @ git+https://github.com/Andrea07072000/S.T.A.R.-.git@dc09f61dcee098d518f070d6a23a8815defc1109#subdirectory=packages/star_sun"

README · tests · evidence (GitHub)

Technical sheet

Package
star-sun
Import name
star_sun
Version
0.1.0
Licence
Apache-2.0
Python
>=3.9
Dependencies
none (standard library only)
Capability
star.orbit.sun
Maturity
Released & Verified (RELEASED)
Published commit
dc09f61d

Requirements

  • R1 sun_vector_au(jd_day, jd_frac=0.0) and sun_ra_dec_deg: geocentric Sun in AU, mean equator and equinox of date, for UT1 Julian dates from 1950-01-01 to 2050-01-01 (inclusive); outside, ValueError. Reproduces Vallado Example 5-1 within 1.2e-6 AU.
  • R2 Measured accuracy (402 dates): direction within 0.0097 deg of JPL DE440 *apparent* and of astropy, distance within 7e-5 AU. The series includes aberration: against *geometric* positions the difference reaches 0.014 deg.
  • R3 beta_angle_deg(sun, inc_deg, raan_deg): angle between the Sun direction and the orbit plane, in [-90, 90], positive on the side of the angular momentum; only the direction of sun is used.
  • R4 in_shadow(r_sat, sun, body_radius=6378.137): True when the satellite is behind the body and closer than one body radius to the Sun-body axis (cylinder, parallel rays, no penumbra); r_sat and body_radius in the same unit.
  • R5 Every function returns finite values or raises ValueError: non-numeric, boolean, NaN, infinite or |value| >= 1e300 input; a vector that is not three numbers; a zero Sun vector; a satellite inside the body; a non-positive body radius; inclination outside [0, 180]; node outside [-360, 360]; a date outside 1950-2050.

Limits (what is not claimed)

Not an ephemeris: 0.01 deg is about 36 arcseconds. No nutation (mean equator of date, about 0.7 deg from J2000 in 2050: rotate before mixing with J2000/GCRF vectors). The shadow is a cylinder: no penumbra, no oblateness, no atmosphere; near the shadow edge the answer can differ from a conical model by tens of seconds of orbit.

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_sun.py 0.933 (2026-10-06)
Independent implementations written by others (needs 2)
astropy get_sun (ERFA epv00 analytical series), JPL DE440 through NAIF CSPICE (numerical integration), PyEphem libastro (VSOP87)
Also compared with, not counted
published values: Vallado Example 5-1 printed values
Result
Released & Verified

Evidence in the registry

CheckStatusRecordedWhat was observed
Clean install from the release tagVERIFIED2026-10-06pytest outside the tree: 73 passed in 0.21s
Unit testsVERIFIED2026-10-0673 passed in 0.44s
ReviewVERIFIED2026-10-06Requirements, interface, units, data provenance, dependency surface and failure behaviour reviewed
ReviewVERIFIED2026-10-06Re-running the cross-check gives a byte-identical evidence file
Reference valueVERIFIED2026-10-06each component within 1.2e-6 AU of the printed values; direction within 6.4e-5 deg (suite: 73 passed in 0.44s)
Mutation testingVERIFIED2026-10-06153/164 = 0.9329
Cross-check with independent librariesVERIFIED2026-10-06star_sun agrees with three independent ephemerides within the accuracy stated for the series, 1950-2050
BenchmarkVERIFIED2026-10-06max angle deg by decade against JPL DE440 apparent: 1950s 0.0055, 1960s 0.0084, 1970s 0.0070, 1980s 0.0074, 1990s 0.0056, 2000s 0.0074, 2010s 0.0060, 2020s 0.0088, 2030s 0.0052, 2040s 0.0097; overall max: astropy 0.0097 deg / 6.8e-05 AU, ephem 0.0140 deg / 6.9e-05 AU, spice_de440_apparent 0.0097 deg / 6.8e-05 AU, spice_de440_geometric 0.0141 deg / 6.8e-05 AU; 402 dates

Fingerprints (SHA-256)

star_sun-0.1.0-py3-none-any.whl412ce030b074224320cc227db1ec855f45c1923a123a7c1e9674a93bdf6e7c8c
star_sun.py9c1a0f1b89694b7cadd6d21fc0c13a2af1ef4533a24740c8eda6fc9fe461aaa7
star_sun-0.1.0-source.zipb56bad88e725bd8614f4992bdaa5ce6836e66845661b219d7c112149eaeac931

results