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

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.1

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.1
File Size Uploaded Provenance Actions
stargazing_core-0.2.1.tar.gz 258.6 kB With provenance Details for stargazing_core-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 520.5 kB

Release files / stargazing_core-0.2.1.tar.gz

Download URL stargazing_core-0.2.1.tar.gz
Size 258.6 kB
Tags Source
SHA-256 checksum
How to use checksums
07ab563e2e319be2717735188350531b0cede5426ca1d276667b2f36c65aaf0b
BLAKE2b-256 checksum
How to use checksums
c95d193eb95e02ea8446b853bc47492ca47bce2d81618811adecc212ab9af3d6
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 Oct 28, 2026.

Transparency log

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

Download URL stargazing_core-0.2.1-py3-none-any.whl
Size 262.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9dcc80419f66257d6a450a15eff1805fcfcb1d447fef3f54b1a35e21c2c4cc3
BLAKE2b-256 checksum
How to use checksums
0dad414f8b34bdf6e5314e9a3d8fe227e5555f996887c2b1d2f9ec2f509bf0b9
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 Oct 28, 2026.

Transparency log

Security for stargazing-core 0.2.1

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.1.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 Oct 28, 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