A Complete Computational Stack

From raw JPL kernel reads to advanced predictive techniques — all in one library, all in Python.

Astronomy-First

JPL DE440 Foundation

Built on NASA's most accurate planetary ephemeris. Iterative light-time correction, multi-body relativistic deflection, annual aberration — every step documented and inspectable.

Transparency

Auditable Calculations

Every intermediate value is accessible. Python API owns orchestration and per-stage controls. Explicit computational policy, deterministic behavior, and documented residuals against ERFA/SOFA.

Stellar Coverage

1,809-Star Sovereign Registry

Sovereign registry with proper motion, parallax, epoch propagation, and Stellar Quality classification. Audited anchor residual: 0.00048 arcseconds (J1000–J3000).

Chart Calculation

22 House Systems + Aspect Patterns

Placidus, Koch, Regiomontanus, Campanus, Morinus, Porphyry, Whole Sign, Equal, APC, Sunshine, and more. 24 zodiacal aspects (including Septile, Novile & Quintile series), 21 multi-body patterns (T-Square, Grand Trine, Yod, Kite…), declination parallels, antiscia.

Predictive Techniques

Comprehensive Predictive Engine

Secondary/tertiary/minor progressions, primary directions (Placidus semi-arc & mundane), solar/lunar returns, Firdaria, Zodiacal Releasing, Vimshottari Dasha, and more.

Advanced Features

Advanced Astronomy

NASA-canon eclipse solver, heliacal phenomena, occultations, astrocartography, galactic coordinates, parans, retrograde stations, harmonics, and synastry.

Research Grade

Validation-First Design

Comprehensive test suite referencing authoritative sources. Validation reports with documented residuals. Reproducible pipelines for research-grade work.

Asteroid Fleet

887,000+ Minor Planets

User-supplied .bsp kernels via integrated daf_writer GUI for any numbered minor planet in the JPL catalog. Classical asteroids, Centaurs, and Trans-Neptunians bundled. Kernel Manager GUI for one-click download.

From install to chart in five lines

Moira's API is designed to be explicit and readable. No magic defaults, no hidden configuration. Every parameter has a clear name and a documented effect.

01
Install
pip install moira_astro — builds the native C++ extension automatically. Requires cmake ≥ 3.24 and pybind11 ≥ 2.12.
02
Configure Kernel
Run moira-kernel-manager (GUI) or moira-download-kernels (CLI) to fetch a JPL DE440/DE441 kernel. One-time setup.
03
Compute
Call m.chart(), m.houses(), m.fixed_star() and more with explicit parameters.
04
Inspect
Access intermediate values, validation reports, and calculation traces.
moira_quickstart.py
1from datetime import datetime, timezone
2from moira import Moira, HouseSystem
3from moira.patterns import find_all_patterns
4from moira.houses import house_of
5 
6m = Moira() # auto-discovers installed JPL kernel
7 
8# 1. Planetary positions - full JPL DE441 reduction
9chart = m.chart(datetime(2000, 1, 1, 12, 0, tzinfo=timezone.utc))
10print(f"Sun: {chart.planets['Sun'].longitude:.6f} deg")
11print(f"Moon: {chart.planets['Moon'].longitude:.6f} deg")
12 
13# 2. House cusps (Placidus, London)
14houses = m.houses(
15 datetime(2000, 1, 1, 12, 0, tzinfo=timezone.utc),
16 latitude=51.5074, longitude=-0.1278,
17 system=HouseSystem.PLACIDUS,
18)
19print(f"ASC: {houses.asc:.4f} deg | MC: {houses.mc:.4f} deg")
20 
21# 3. Aspect patterns (21 multi-body configurations)
22patterns = find_all_patterns(chart.longitudes())
23for p in patterns:
24 print(f"{p.name}: {', '.join(p.bodies)}")
25 
26# 4. House placement lookup
27sun_house = house_of(chart.planets['Sun'].longitude, houses)
28print(f"Sun is in house: {sun_house}")

Moira vs. the competition

Direct feature comparison with other Python astrology libraries.

FeatureMoiraKerykeionImmanuelSwiss Eph.
Python API with inspectable stages
Inspectable intermediate stages
JPL DE440 kernel support
IAU-aligned precession/nutation
Fixed star catalogpartial
25+ house systemspartialpartial
Eclipse & occultation enginepartial
Heliacal phenomena
40+ ayanamshas (Vedic sidereal)
Primary directions (built-in)
Vimshottari Dasha & Nakshatras
Astrocartography (ACG lines)
499 Arabic Parts
Documented validation residuals
MIT License (commercial friendly)
Harmograms / spectral research engine
Synastry, composite & Davison chartspartialpartial
SVG chart generation

* Kerykeion and Immanuel are wrappers over the Swiss Ephemeris C library (pyswisseph). Swiss Ephemeris is a powerful C library with 25+ house systems, eclipses, and fixed stars — but it requires AGPL or a paid commercial license, uses compiled C binaries, and does not expose intermediate calculation stages. Primary directions, Dasha systems, and astrocartography are not part of its core API and require separate implementation.

Moira vs. Swiss Ephemeris

Swiss Ephemeris is a serious, well-validated C library. This is a developer-to-developer comparison of what each approach offers and where the trade-offs lie.

SE

Swiss Ephemeris

LanguageC library (pyswisseph Python binding)
LicenseAGPL-3.0 or CHF 750+ commercial
KernelBundled Astrodienst files (not JPL SPICE)
Intermediate stagesNot accessible — black-box C
House systems25+ systems
Fixed starsCatalog included
Primary directionsNot in core API
Dasha / NakshatrasNot in core API
AstrocartographyNot in core API
HarmogramsNot available

Swiss Ephemeris is mature, accurate, and widely deployed. The AGPL license means any application using it must also be open-sourced — or you pay for a commercial license. The C binary means you cannot step through the calculation, modify a stage, or validate an intermediate value without reading C source.

M

Moira

LanguagePython API + C++17 native core
LicenseMIT — commercial use free, forever
KernelJPL DE441/DE440/DE430 SPICE files
Intermediate stagesFully accessible, individually toggleable
House systems22 systems
Fixed stars1,809 sovereign registry + Gaia DR3
Primary directionsBuilt-in (Placidus semi-arc & mundane)
Dasha / NakshatrasVimshottari Dasha, 27 nakshatras
AstrocartographyACG lines, Local Space, Gauquelin
HarmogramsH1–H5 spectral research engine

Moira's Python API orchestrates a C++17 native core for performance while keeping every stage inspectable. The MIT license removes all commercial friction. Features like primary directions, Dasha systems, harmograms, and astrocartography are first-class citizens, not afterthoughts.

When to choose which

Choose Swiss Ephemeris if…
You already have a codebase built on pyswisseph
You need SVG/PDF chart rendering (Astrodienst tools)
You already have a codebase built on pyswisseph
You need SVG/PDF chart rendering (Astrodienst tools)
Choose Moira if…
You need MIT licensing for commercial products
You want to inspect, modify, or validate any calculation stage
You need primary directions, Dasha, harmograms, or astrocartography
You are building research pipelines that cite specific parameters
You want a Python-native API without a C dependency chain
Abstract digital orrery showing orbital mechanics

Python orchestration. C++17 performance.

Moira runs a C++17 native extension (_moira_native) for performance-critical paths, while the Python layer owns the API surface, orchestration, and per-stage controls. Every transformation is named, documented, and individually toggleable.

JPL DE441/DE440 Kernel
Raw barycentric state vectors via SPICE SPK files (C++ native reader)
Light-Time Iteration
Iterative correction for finite speed of light
Relativistic Deflection
Multi-body (Sun, Jupiter, Saturn, Earth) gravitational bending
IAU 2000A/2006 Nutation (C++ native)
2,414 terms; evaluated by _moira_native for speed
Annual Aberration
Velocity-based stellar aberration correction
Topocentric Parallax
WGS-84 observer position correction
Astrological Output
Houses, aspects, dignities, predictive techniques, synastry, harmograms
Community · MIT License

Ready to build with Moira?

Install in seconds. MIT licensed. No hidden dependencies.