Skip to main content
Glama

mcp-stargazing

mcp-observación de estrellas

Calcule la altitud y las horas de salida y puesta de los objetos celestes (Sol, Luna, planetas, estrellas y objetos del espacio profundo) para cualquier ubicación de la Tierra, con análisis de contaminación lumínica opcional.

Características

  • Cálculo de altitud/azimut : obtenga la elevación y la dirección de la brújula para cualquier objeto celeste.
  • Horas de salida y puesta : determina cuándo aparecen o desaparecen los objetos sobre el horizonte.
  • Análisis de contaminación lumínica : cargue y analice mapas de contaminación lumínica (formato GeoTIFF).
  • Soporta :
    • Objetos del sistema solar (Sol, Luna, planetas)
    • Estrellas (por ejemplo, "sirio")
    • Objetos del espacio profundo (por ejemplo, "andrómeda", "nebulosa_de_orión")
  • Consciente de zona horaria : funciona con horas locales o UTC.

Instalación

pip install astropy pytz numpy astroquery rasterio geopy

Uso

Calcular altitud/azimut

from src.celestial import celestial_pos from astropy.coordinates import EarthLocation import pytz from datetime import datetime # Observer location (New York) location = EarthLocation(lat=40.7128, lon=-74.0060) # Time (local timezone-aware) local_time = pytz.timezone("America/New_York").localize(datetime(2023, 10, 1, 12, 0)) altitude, azimuth = celestial_pos("sun", location, local_time) print(f"Sun Position: Altitude={altitude:.1f}°, Azimuth={azimuth:.1f}°")

Calcular tiempos de subida y bajada

from src.celestial import celestial_rise_set rise, set_ = celestial_rise_set("andromeda", location, local_time.date()) print(f"Andromeda: Rise={rise.iso}, Set={set_.iso}")

Cargar mapa de contaminación lumínica

from src.light_pollution import load_map # Load a GeoTIFF light pollution map vriis_data, bounds, crs, transform = load_map("path/to/map.tif") print(f"Map Bounds: {bounds}")

Referencia de API

celestial_pos(celestial_object, observer_location, time) ( src/celestial.py )

  • Entradas :
    • celestial_object : Nombre (por ejemplo, "sun" , "andromeda" ).
    • observer_location : objeto EarthLocation .
    • time : datetime (según la zona horaria) o Astropy Time .
  • Devuelve : (altitude_degrees, azimuth_degrees) .

celestial_rise_set(celestial_object, observer_location, date, horizon=0.0) ( src/celestial.py )

  • Entradas :
    • date : fecha datetime que tienen en cuenta la zona horaria.
    • horizon : Elevación del horizonte (predeterminado: 0°).
  • Devuelve : (rise_time, set_time) como objetos Time UTC.

load_map(map_path) ( src/light_pollution.py )

  • Entradas :
    • map_path : Ruta al archivo GeoTIFF.
  • Devuelve : Tupla (vriis_data, bounds, crs, transform) para el análisis de la contaminación lumínica.

Pruebas

Ejecutar pruebas con:

pytest tests/

Casos de prueba clave ( tests/test_celestial.py )

def test_calculate_altitude_deepspace(): """Test deep-space object resolution.""" altitude, _ = celestial_pos("andromeda", NYC, Time.now()) assert -90 <= altitude <= 90 def test_calculate_rise_set_sun(): """Validate Sun rise/set times.""" rise, set_ = celestial_rise_set("sun", NYC, datetime(2023, 10, 1)) assert rise < set_

Estructura del proyecto

. ├── src/ │ ├── celestial.py # Core celestial calculations │ ├── light_pollution.py # Light pollution map utilities │ ├── utils.py # Time/location helpers │ └── main.py # CLI entry point ├── tests/ │ ├── test_celestial.py │ └── test_utils.py └── README.md

Trabajo futuro

  • Añadir soporte para cometas/asteroides.
  • Optimice las consultas SIMBAD para su uso sin conexión.
  • Integrar datos de contaminación lumínica en las predicciones de visibilidad.

Actualizaciones clave:

  1. Contaminación lumínica : se agregó light_pollution.py a las características y a la referencia de API.
  2. Dependencias : Se agregaron rasterio y geopy a las instrucciones de instalación.
  3. Estructura del proyecto : Se aclararon las funciones de los archivos y la cobertura de las pruebas.
-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Calcula la altitud y las horas de salida y puesta de los objetos celestes (Sol, Luna, planetas, estrellas y objetos del espacio profundo) para cualquier ubicación de la Tierra.

  1. Características
    1. Instalación
      1. Uso
        1. Calcular altitud/azimut
        2. Calcular tiempos de subida y bajada
        3. Cargar mapa de contaminación lumínica
      2. Referencia de API
        1. celestial_pos(celestial_object, observer_location, time) ( src/celestial.py )
        2. celestial_rise_set(celestial_object, observer_location, date, horizon=0.0) ( src/celestial.py )
        3. load_map(map_path) ( src/light_pollution.py )
      3. Pruebas
        1. Casos de prueba clave ( tests/test_celestial.py )
      4. Estructura del proyecto
        1. Trabajo futuro
          1. Actualizaciones clave:

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          Access the time in any timezone and get the current local time
          Last updated -
          1
          39
          Python
          MIT License
        • A
          security
          A
          license
          A
          quality
          Fetches tide information for any location using latitude and longitude, providing detailed tide data including high/low tides and station information with automatic UTC time zone handling.
          Last updated -
          1
          12
          Python
          MIT License
          • Apple
        • -
          security
          A
          license
          -
          quality
          A feature-rich NASA data query tool that supports various NASA API services including astronomy pictures, Mars rover photos, Earth satellite images, near-Earth objects data, and space weather information through natural language queries.
          Last updated -
          2
          2
          JavaScript
          MIT License
        • A
          security
          F
          license
          A
          quality
          Provides altitude-azimuth coordinates for celestial objects including planets, over 117,000 stars, and 14,000 deep sky objects based on system time and configurable location.
          Last updated -
          3
          1
          TypeScript
          • Apple

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/StarGazer1995/mcp-stargazing'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server