Solarsystem: A Validated Lightweight Python Package for Planetary Positions and Solar-Lunar Event Calculations
Ioannis Nasios
astro-ph.EP, astro-ph.IM, astro-ph.SR, cs.CG, cs.SE
Submitted: 2026-06-25
Code: https://github.com/IoannisNasios/solarsystem
License: http://creativecommons.org/licenses/by-sa/4.0/
The gist: This paper presents solarsystem, a validated lightweight and dependency-free Python package for planetary positions and solar-lunar event calculations.
Terminology
Abstract
This paper presents solarsystem, a validated lightweight and dependency-free Python package for planetary positions and solar-lunar event calculations. The package provides heliocentric and geocentric positions for the major planets, selected dwarf planets, the Centaur Chiron, and the Moon, together with sunrise, sunset, moonrise, moonset, and lunar illumination calculations. Additional functionality includes coordinate transformations between commonly used astronomical reference systems. The implemented algorithms employ analytical models that avoid reliance on external ephemeris datasets, resulting in a portable and computationally efficient solution suitable for a broad range of astronomical applications. An optional precession correction model is included, enabling calculations either in a precession-corrected reference frame or in a fixed epoch framework, depending on user requirements. The numerical performance of solarsystem was evaluated against the JPL DE440 planetary ephemerides using the Skyfield framework as a reference. Validation experiments spanning multiple bodies and extended temporal intervals demonstrate good agreement with the reference ephemerides, with mean planetary longitude and latitude deviations of approximately 0.44 and 0.16 arcminutes, respectively. Additional validation of solar and lunar event calculations yielded timing differences of only a few minutes relative to the reference solutions, while lunar illumination estimates differed by approximately 0.2%. The package can be installed directly through PyPI while the source code, documentation, validation notebooks and example workflows are publicly available through the project repository in https://github.com/IoannisNasios/solarsystem.
Related papers
- PDS 70 c and SR 12 c: Observational Constraints on Giant-Planet and Satellite Formation
- Two-stage disruption of resonant chains
- Detectability of resolved hydrogen lines from the accretion shock at gas giants and their CPDs
- Binary-lens Microlensing Degeneracy: Impact on Planetary Sensitivity and Mass-ratio Function
- Atmospheric escape fractionates secondary but not primary atmospheres
- The Occurrence Rate of Nearby Planetary Companions to Hot Jupiters