GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cozenom/star-plotter: Python tool that plots the night sky from any location and time, with stars, constellations and planets.

BranchesTags
Open more actions menu

Latest commit

 

History

357 Commits
357 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
images
images
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
constellation_abbreviations.json
constellation_abbreviations.json
 
 
constellationship.fab
constellationship.fab
 
 
daily.py
daily.py
 
 
demo.py
demo.py
 
 
plot.py
plot.py
 
 

Repository files navigation

Constellation Plotter

A Python tool that generates beautiful stereographic projections of the night sky from any location on Earth. Visualize visible stars, constellations, and planets with accurate astronomical data.

Features

  • Accurate star positions using the Hipparcos catalog (~118,000 stars)
  • Planet positions for all major planets and the Moon
  • Constellation lines and labels with proper astronomical designations
  • Multiple viewing modes: visible sky, non-visible sky, or both sides
  • Time-based plotting - visualize the sky at any date/time
  • Customizable limiting magnitude to simulate different viewing conditions (light pollution, dark sky, etc.)
  • High-performance caching for fast repeated renders

Installation

pip install skyfield geopy matplotlib numpy

Usage

Basic Example

from plot import plot_constellations

# Plot visible sky from Reykjavik (current time)
plot_constellations(place="Reykjavik")

Available Parameters

plot_constellations(
    place="Los Angeles",           # Location name
    limiting_magnitude=6.0,         # Star visibility (4.0=city, 6.0=suburbs, 7.0+=dark sky)
    time=None,                      # datetime object (None = current time)
    fname=None,                     # Custom filename (None = auto-generated)
    mode="visible"                  # "visible", "nonvisible", or "both"
)

Examples

from plot import plot_constellations
from datetime import datetime, timezone

# Show both visible and non-visible sky side-by-side
plot_constellations(place="Reykjavik", mode="both")

# Non-visible constellations only (opposite side of Earth)
plot_constellations(place="Sydney", mode="nonvisible")

# Specific date/time
winter_solstice = datetime(2025, 12, 21, 0, 0, tzinfo=timezone.utc)
plot_constellations(place="Los Angeles", time=winter_solstice)

# Only show brighter stars
plot_constellations(place="Tokyo", limiting_magnitude=4.0)

# Custom filename
plot_constellations(place="Cape Town", fname="my_custom_sky.png")

Example Outputs

Reykjavik - Both Sides View

Shows both the visible sky and the non-visible sky (opposite side of Earth) simultaneously.

Reykjavik Both

Los Angeles - Visible Sky

Current visible constellations from Los Angeles.

Los Angeles

Berlin - Winter Solstice (Both Sides)

Winter night sky in Berlin with enhanced star visibility.

Berlin Winter

Sydney - Non-Visible Sky

Shows what's on the opposite side of Earth from Sydney.

Sydney Non-Visible

Tokyo - Light Pollution

Simulates city viewing conditions with limiting magnitude 4.0.

Tokyo

How It Works

  1. Geocoding: Converts place names to coordinates using Nominatim (with LRU caching)
  2. Astronomical Calculations: Uses Skyfield to compute star and planet positions
  3. Stereographic Projection: Maps the celestial sphere onto a 2D plane centered on zenith
  4. Rendering: Matplotlib generates publication-quality images

Performance

The tool uses aggressive caching for optimal performance:

  • Module-level caching: Star catalogs and ephemeris data loaded once at import
  • LRU cache: Geocoding results cached to avoid repeated network calls
  • First run: ~2-5 seconds (loads astronomical data)
  • Subsequent runs: Much faster (only calculations needed)

Files

  • plot.py - Main plotting functions
  • demo.py - Example showcase script demonstrating all features
  • daily.py - Automated daily sky generation for 8 global cities
  • constellationship.fab - Constellation line data
  • constellation_abbreviations.json - Constellation name mappings
  • de421.bsp - JPL planetary ephemeris (auto-downloaded by Skyfield)
  • hip_main.dat - Hipparcos star catalog (auto-downloaded by Skyfield)

Credits

  • Star data: Hipparcos Catalog
  • Planetary positions: JPL DE421 Ephemeris
  • Constellation data: Stellarium
  • Astronomical calculations: Skyfield

About

Python tool that plots the night sky from any location and time, with stars, constellations and planets.

Topics

hipparcosmatplotlibpythonskyfieldstar-chart

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.