Skip to main content

stargazing-core

PyPI version Python

Shared astronomical computation package for the stargazing toolchain — telescope optics, deep-sky catalog, and equipment presets used by both mcp-stargazing and stargazing-place-finder.

Installation

pip install stargazing-core

Requires Python ≥ 3.11.

Quick Start

from stargazing_core import TelescopeConfig, TelescopeOptics, TELESCOPE_PRESETS

# Look up a preset
config = TELESCOPE_PRESETS['seestar-s50']

# Compute derived optics
optics = config.compute_optics()
print(f'FOV: {optics.fov_width_deg:.1f}° × {optics.fov_height_deg:.1f}°')
# → FOV: 1.7° × 1.3°

Modules

Module Purpose
_catalog.py 10,000+ Messier/NGC deep-sky object catalog
_celestial_models.py Pydantic models: CelestialPosition, RiseSet, MoonInfo, VisiblePlanet
_constellation.py Constellation center lookup
_coord.py Coordinate validation (validate_coordinates)
_ephemeris.py Ephemeris calculations for observing windows
_filtering.py Deep-sky object filtering pipeline
_geo.py GeoBounds / GeoPoint shared geometry types
_moon.py Moon phase / altitude / illumination
_mosaic.py Mosaic grid computation for wide-field targets
_pagination.py Generic PaginatedResult[T]
_planets.py Solar-system planet visibility
_shooting_plan.py ShootingPlan / ShootingSlot — imaging schedule engine
_telescope.py TelescopeConfig, TELESCOPE_PRESETS, match_telescope_targets
_timegrid.py Altitude curve time-grid generation

Consumers

Project Usage
mcp-stargazing get_telescope_targets, get_shooting_plan tools; shared CelestialPosition/RiseSet/MoonInfo models
stargazing-place-finder TelescopeConfig, GeoPoint, telescope target matching endpoint

Public API

All symbols are importable from the top-level package:

from stargazing_core import (
    # Telescope
    TelescopeConfig, TelescopeOptics, TELESCOPE_PRESETS,
    # Deep-sky matching
    DeepSkyCatalog, load_objects,
    match_telescope_targets, filter_candidates_by_lst, score_deep_sky_objects,
    # Shooting plan
    ShootingPlan, ShootingSlot, generate_shooting_schedule,
    # Mosaic
    MosaicPanel, MosaicGrid, compute_mosaic_grid,
    # Celestial models
    CelestialPosition, RiseSet, MoonInfo, VisiblePlanet,
    # Astronomy
    calculate_moon_info, get_moon_altaz, get_visible_planets, identify_constellation,
    # Geometry
    GeoPoint, GeoBounds, TimeInfo, validate_coordinates,
    # Time grid
    generate_time_grid, find_rise_set_indices,
    # Pagination
    PaginatedResult,
)

Compatibility

generate_shooting_schedule interprets historical naive dusk/dawn strings as UTC. An explicit ISO UTC offset preserves the instant and is converted to UTC for scheduling, including altitude-curve alignment and moonset delay. The original input strings remain echoed in dusk/dawn; slot timestamps are UTC. A nonpositive interval yields an empty plan with zero duration and a warning. These source fixes need a package release before installed consumers receive them; no version publication is included in this change.

Target ranking computes positions for the requested observing night. Missing/non-finite photometry earns no surface-brightness bonus; telescope results represent unknown magnitudes as null and keep suitability scores finite. The filter matcher recognizes common SIMBAD type codes such as OpC, HII, G, and PN as well as English object types. These source corrections require a new core package release before installed consumers receive them.

Consumer Min version Status
mcp-stargazing >=0.1.0 ✅ Active
stargazing-place-finder >=0.1.0 ✅ Active

Cross-repository CI

Changes to core run both consumer suites against a locally built core wheel. The shared baseline/candidate policy is documented in mcp-stargazing/docs/dependency-chain-ci.md.

Release

Version: 0.1.0 (PyPI)

Release process:

  1. Bump version in pyproject.toml
  2. Merge to main → auto-tag workflow creates vX.Y.Z tag
  3. Tag push triggers release-pypi.yml → OIDC Trusted Publishing to PyPI
  4. GitHub Release auto-generated

Development

uv sync
uv run pytest -v
uv run ruff format --check . && uv run ruff check .

Metadata

Release files for stargazing-core 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stargazing-core 0.2.2
File Size Uploaded Provenance Actions
stargazing_core-0.2.2.tar.gz 259.6 kB With provenance Details for stargazing_core-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stargazing-core 0.2.2
File Interpreter ABI Platform Actions
stargazing_core-0.2.2-py3-none-any.whl Python 3 none any Details for stargazing_core-0.2.2-py3-none-any.whl

Total release size: 522.0 kB

Release files / stargazing_core-0.2.2.tar.gz

Download URL stargazing_core-0.2.2.tar.gz
Size 259.6 kB
Tags Source
SHA-256 checksum
How to use checksums
379bfbeb034f171088d4957ba20353ad99143162296b483f0c4bf557759ccfb6
BLAKE2b-256 checksum
How to use checksums
c1af52cc22c956280fbac6aab76ec86c1a0913ac12244c1e71b294c24e95a2b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / stargazing_core-0.2.2-py3-none-any.whl

Download URL stargazing_core-0.2.2-py3-none-any.whl
Size 262.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5cbf7b378e567b65b3bad63ea130206a4c061cb0eb5d1cc059265a8f20eceafd
BLAKE2b-256 checksum
How to use checksums
fbb08954f7212e16fe9caf223c446258594bbc87bd837c699d64afe6bff02cf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for stargazing-core 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for stargazing_core-0.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page