Skip to main content

Generate circular star charts for a location and time.

Project description

Sidereal Canvas

Sidereal Canvas turns an observer location and UTC time into a circular chart of the stars above the horizon.

Astropy places catalog stars in the local sky. Matplotlib renders them on a black, zenith-centered projection, with apparent magnitude controlling visual prominence and B-V-derived colors giving each star an approximate hue.

Example chart

What it does

  • transforms fixed HYG catalog coordinates into local altitude and azimuth;
  • plots the geometric above-horizon sky with north at the top, east on the left, and west on the right;
  • scales marker area and opacity from apparent magnitude;
  • adds a restrained glow, horizon fade, cardinal directions, title, and Sidereal Canvas footer;
  • combines exact-name labels with a requested number of the brightest named stars;
  • exports PNG, SVG, and PDF with explicit dimensions and overwrite protection;
  • runs from a committed catalog with no catalog download during rendering.

The core is an installable src/-layout Python package. Its coordinate, catalog, and rendering functions are covered by an offline test suite.

Install and render

Sidereal Canvas requires Python 3.14 or newer. Install and render with:

python -m pip install sidereal-canvas

sidereal-canvas render \
  --lat 47.6101 \
  --lon -122.2015 \
  --title "Bellevue, WA" \
  --time "2025-01-01T08:00:00Z" \
  --mag-limit 6.0 \
  --label-brightest 10 \
  --output bellevue.png

Use sidereal-canvas info to inspect the installed version, catalog checksum, row count, magnitude cutoff, and supported formats.

For visual development, python -m scripts.render_static_sky writes a deterministic matrix of Bellevue charts to artifacts/.

Run the checks with:

pytest
ruff check .
git diff --check

See CONTRIBUTING.md for a source checkout and development environment.

How a chart is built

  1. Load and validate the packaged HYG-derived catalog.
  2. Apply the limiting-magnitude filter.
  3. Transform the remaining ICRS-like catalog directions to local AltAz coordinates for an EarthLocation and UTC Time.
  4. Keep stars above the geometric horizon.
  5. Select labels from the plotted rows.
  6. Convert altitude to zenith distance with radius = 90° - altitude.
  7. Draw glow and core marker layers, then labels and chart text.
  8. Save the finished figure as PNG, SVG, or PDF.

The observer-looking-up projection puts the zenith at the center and the horizon at the outer circle. A star keeps the same marker styling when the magnitude cutoff changes, making charts directly comparable.

Scientific interpretation

The chart uses geometric, unrefracted coordinates. Real observing conditions also depend on sky brightness, weather, atmospheric extinction, terrain, and the observer or instrument. Catalog directions remain fixed at their J2000.0/ICRS-like positions, so proper motion is not propagated. Stellar colors are display approximations derived from B−V rather than direct temperature measurements.

The detailed conventions and accuracy boundaries are documented in docs/scientific-notes.md.

Data

The packaged catalog is derived from HYG Database v4.1 and contains 108,071 stars through apparent magnitude 10.0. Preprocessing verifies a pinned source checksum, preserves HYG identifiers, converts right ascension from hours to degrees, estimates display temperatures, and writes deterministic CSV bytes.

Catalog provenance, measurements, regeneration instructions, and licensing are in data/README.md.

Command reference

Version 0.1.0 renders from custom latitude and longitude, an offset-aware UTC timestamp, and a limiting magnitude. It supports exact-name and brightest-star labels plus PNG, SVG, and PDF output. The full command contract is in docs/cli.md, and planned additions are in docs/roadmap.md.

Documentation

Data and acknowledgments

Data: HYG Database v4.1 by Astronexus, licensed under CC BY-SA 4.0. Stellar display colors are generated during preprocessing with starhue, distributed under the BSD 3-Clause License.

License

Original Sidereal Canvas code is licensed under the MIT License. The packaged derived catalog at src/sidereal_canvas/data/stars_mag100.csv is licensed separately under CC BY-SA 4.0. See THIRD_PARTY_NOTICES.md for details.

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

sidereal_canvas-0.1.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

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

sidereal_canvas-0.1.0-py3-none-any.whl (2.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sidereal_canvas-0.1.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sidereal_canvas-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5faf082d2381a10d0ad45fef7efcac2cf1641a0c4c1940b470ea29775726a752
MD5 b410f549e7aaecb60cb904f2714f097c
BLAKE2b-256 e8643dfc301ccb9c11fce43f4d955b6ca926fb9e55f1a1bd246f379a87d0e3b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for sidereal_canvas-0.1.0.tar.gz:

Publisher: release.yml on rivak7/sidereal-canvas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for sidereal_canvas-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b93f7340d9c69a700e10c47e68b2cbffce8320bcf170098f2bc29c9ffd3aa2bd
MD5 5f9843e7ebe833a26c63976ea5e85394
BLAKE2b-256 5b5d039d630e73ffffc38b3281175eecbd75634c3668af9229841f18ccf96df2

See more details on using hashes here.

Provenance

The following attestation bundles were made for sidereal_canvas-0.1.0-py3-none-any.whl:

Publisher: release.yml on rivak7/sidereal-canvas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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