Sunday, October 12, 2025

Calculations Maya Observatory

 from astropy.coordinates import EarthLocation, AltAz, get_body

from astropy.time import Time

import astropy.units as u


# --- Step 1: Define Location and Time ---

chichen_itza = EarthLocation(

    lat=20.6843*u.deg,    # Latitude of Chichen Itza

    lon=-88.5678*u.deg,   # Longitude

    height=30*u.m         # Elevation

)


# July 17, 2025, 8:00 PM *local time* (UTC-5 → 1:00 AM UTC next day)

obs_time = Time("2025-07-18 01:00:00")


# --- Step 2: Get Planet Positions ---

# Load JPL ephemeris for high-precision calculations

with solar_system_ephemeris.set('jpl'):

    # Venus

    venus = get_body("venus", obs_time, chichen_itza)

    venus_altaz = venus.transform_to(AltAz(obstime=obs_time, location=chichen_itza))

    print(f"Venus Azimuth: {venus_altaz.az.deg:.2f}° (Target: 70° | Match: {'✅' if abs(venus_altaz.az.deg - 70) < 2 else '❌'})")


    # Moon

    moon = get_body("moon", obs_time, chichen_itza)

    moon_altaz = moon.transform_to(AltAz(obstime=obs_time, location=chichen_itza))

    print(f"Moon Azimuth: {moon_altaz.az.deg:.2f}° (Target: 120° | Match: {'✅' if abs(moon_altaz.az.deg - 120) < 2 else '❌'})")


    # Uranus

    uranus = get_body("uranus", obs_time, chichen_itza)

    uranus_altaz = uranus.transform_to(AltAz(obstime=obs_time, location=chichen_itza))

    print(f"Uranus Azimuth: {uranus_altaz.az.deg:.2f}° (Target: 210° | Match: {'✅' if abs(uranus_altaz.az.deg - 210) < 2 else '❌'})")


# --- Step 3: Pleiades (Star Cluster) ---

# Use SkyCoord.from_name for stars/clusters (e.g., Alcyone in Pleiades)

from astropy.coordinates import SkyCoord

pleiades = SkyCoord.from_name("Alcyone")  # Brightest star in Pleiades

pleiades_altaz = pleiades.transform_to(AltAz(obstime=obs_time, location=chichen_itza))

print(f"Pleiades Azimuth: {pleiades_altaz.az.deg:.2f}° (Target: 45° | Match: {'✅' if abs(pleiades_altaz.az.deg - 45) < 2 else '❌'})")


No comments: