Skip to main content

Compute and animate local solar eclipse circumstances.

Project description

ecliptica

image

eclipticae is a Python library + CLI to compute local solar eclipse circumstances and render eclipse animations with Manim.

CI License: MIT

MVP Features

  • Compute the next local eclipse from a start date (partial, annular, or total).
  • Export eclipse metadata to JSON.
  • Render 2D map or 3D globe .mp4 animations from exported JSON.
  • Preview mode for faster iteration (--preview) and optional render cache control (--disable-caching).

Install

uv sync

Linux prerequisite packages for Manim (needed before uv sync):

sudo apt-get update
sudo apt-get install -y pkg-config libcairo2-dev libpango1.0-dev ffmpeg

CLI Usage

Compute an event:

uv run eclipticae compute --lat 40.4168 --lon -3.7038 --date 2026-01-01 --out event.json

Render world map shadow video (default scene):

uv run eclipticae render --input event.json --out eclipse_map.mp4 --quality high

Render fast preview while iterating on visuals:

uv run eclipticae render --input event.json --out eclipse_preview.mp4 --scene map --preview --quality low

Render 3D globe scene:

uv run eclipticae render --input event.json --out eclipse_globe.mp4 --quality high --scene globe

Render a multi-year Saros-style sequence with dimmed historical traces:

uv run eclipticae render-saros --year 2021 --name total --years 20 --out saros_paths.mp4 --quality high

Lookup a global eclipse by year/name and include a combined Saros chain:

uv run eclipticae lookup --year 2026 --name annular --out eclipse_lookup.json

Use the interactive wizard to build commands step-by-step:

uv run eclipticae wizard

Wizard highlights:

  • Arrow-key menus in interactive terminals.
  • Render from an existing event JSON or pick upcoming eclipses from a chosen year.
  • For render-saros, choose the anchor eclipse from that year (no manual anchor-name typing).
  • Adaptive defaults: low quality recommends preview mode and prefers faster renderer options.
  • Global wizard setting for caching default, so you don't need to answer that every run.
  • Back navigation inside wizard: choose Back in menus or use Esc/Ctrl+C.
  • Outputs exact command(s) and can run them immediately.

Renderer note:

  • opengl is currently supported for --scene globe renders.
  • map and render-saros use cairo.

Python Usage

from eclipticae import compute_site_eclipse, render_scene, save_event

event = compute_site_eclipse(
    latitude=40.4168,
    longitude=-3.7038,
    date_or_datetime="2026-01-01",
    elevation_m=667,
)
save_event(event, "event.json")
render_scene(event, "eclipse_map.mp4", quality="high", scene="map")

Dev Commands

uv run ruff check .
uv run ruff format .
uv run ty check
uv run pytest

Install pre-commit hooks:

uv run pre-commit install

Run all checks at once (PowerShell):

.\scripts\check_all.ps1

Project Docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eclipticae-0.1.0.tar.gz (170.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eclipticae-0.1.0-py3-none-any.whl (183.4 kB view details)

Uploaded Python 3

File details

Details for the file eclipticae-0.1.0.tar.gz.

File metadata

  • Download URL: eclipticae-0.1.0.tar.gz
  • Upload date:
  • Size: 170.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for eclipticae-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d52acfa1637f0b6937c0247056b28f37d1c34c0d4ef3189830e8045e48a095bb
MD5 9a19187e84376f73e376578dde4ccdb5
BLAKE2b-256 34a7857cac44acbd10f4c350cf7150b6b2fad37f3ba9d1203650c6cafb58c34d

See more details on using hashes here.

File details

Details for the file eclipticae-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: eclipticae-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 183.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for eclipticae-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6b92bac678ceb8110c09c73e57c4e0947076a8cb3f6f41c9d56d275f528255c
MD5 da009492426f5273dad982921ec02d1a
BLAKE2b-256 38c8ad5ce1be1faf043768c98e9036239adb0ebd5f88b91372650b824d743ffc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page