Astronomy that shows its work
An educational Python toolkit for astronomical calculations.
CLI and Python API with transparent, step-by-step mathematics.
$ starward moon phase --verbose
# Moon Phase Calculation
Julian Date: 2460676.5
Days since new moon: 12.4
Phase angle: 151.2°
Illumination: 93.2%
Waxing GibbousTransparent
Every calculation explains itself. Use --verbose to see step-by-step mathematics, intermediate values, and algorithm references.
Precise
500+ tests validated against authoritative sources: USNO, JPL Horizons, IAU SOFA, and Meeus algorithms.
Complete
9 interconnected modules covering time systems, coordinates, the Sun, Moon, planets, and observation planning.
Two ways to explore the cosmos
Use the CLI for quick calculations or the Python API for integration
$ starward sun position --observer "New York"
Sun Position for New York
─────────────────────────
Right Ascension: 19h 42m 15.3s
Declination: -21° 58' 42"
Altitude: 32.4°
Azimuth: 215.7°
Distance: 0.9838 AU
Nine modules for the solar system
Everything you need for astronomical calculations
Time
Julian dates, sidereal time, calendar conversions
🧭Coordinates
ICRS, Galactic, Horizontal transformations
📐Angles
DMS/HMS parsing, angular separation
☀️Sun
Position, rise/set, twilight times
🌙Moon
Phase, illumination, rise/set
🪐Planets
Mercury to Neptune positions and visibility
📍Observer
Location management with timezone support
🔭Visibility
Airmass, transit times, observation planning
📊Constants
30+ IAU/CODATA constants with uncertainties
See the astronomy, not just the answer
Traditional astronomy tools are black boxes. starward is different. Every calculation can show its work with --verbose mode.
- Step-by-step mathematics
- Intermediate values at each stage
- Algorithm references and sources
- Perfect for learning and verification
Standard output
$ starward time jd
2460676.50000
With --verbose
$ starward time jd --verbose
# Julian Date Calculation
# Algorithm: Meeus, Astronomical Algorithms (2nd ed.)
Input date: 2025-01-12 00:00:00 UTC
Step 1: Adjust for January/February
Year (Y): 2025
Month (M): 1 → adjusted to 13
Adjusted year: 2024
Step 2: Calculate intermediate values
A = floor(Y / 100) = 20
B = 2 - A + floor(A / 4) = -13
Step 3: Compute Julian Date
JD = floor(365.25 × (Y + 4716))
+ floor(30.6001 × (M + 1))
+ D + B - 1524.5
JD = 2460676.50000
Result: 2460676.50000
Built for curious minds
Whether you're learning, teaching, observing, or building
Students
Learn celestial mechanics with calculations that explain themselves. Verbose mode reveals the mathematics behind every result.
Amateur Astronomers
Plan your observing sessions. Find rise/set times, optimal viewing windows, and track planets across the sky.
Educators
Teach astronomical concepts with a tool that shows its work. Students can see exactly how calculations are performed.
Developers
Integrate astronomy into your applications with a clean Python API. JSON output for easy parsing and automation.
Ready to explore?
Install starward with pip and start calculating
pip install starwardRequires Python 3.9+