Search papers, labs, and topics across Lattice.
The paper introduces solarsystem, a lightweight Python package designed for calculating planetary positions and solar-lunar events without external dependencies. It employs analytical models to provide heliocentric and geocentric positions for major celestial bodies and offers precise calculations for solar and lunar events, validated against the JPL DE440 ephemerides. Validation results show that solarsystem achieves mean deviations of approximately 0.44 and 0.16 arcminutes for planetary longitude and latitude, respectively, making it a reliable tool for various astronomical applications.
Achieving mean deviations of only 0.44 arcminutes from established ephemerides, solarsystem redefines lightweight astronomical calculations.
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.