"""Messier catalog data.

Contains all 110 Messier objects with coordinates, magnitudes, and metadata.
Data sourced from SEDS Messier Database and NASA/IPAC Extragalactic Database.
"""

from dataclasses import dataclass
from typing import Dict, Optional


@dataclass(frozen=True)
class MessierObject:
    """A Messier catalog object with metadata."""

    number: int  # Messier number (1-110)
    name: str  # Common name
    object_type: str  # Type classification
    ra_hours: float  # Right ascension in decimal hours
    dec_degrees: float  # Declination in decimal degrees
    magnitude: float  # Visual magnitude
    size_arcmin: float  # Angular size (major axis) in arcminutes
    distance_kly: Optional[float]  # Distance in kilo-light-years (None if unknown)
    constellation: str  # Three-letter constellation abbreviation
    ngc: Optional[str]  # NGC designation if applicable
    description: str  # Brief description

    def __repr__(self) -> str:
        return f"M{self.number} ({self.name})"

    @classmethod
    def from_dict(cls, data: dict) -> 'MessierObject':
        """Create a MessierObject from a dictionary (database row)."""
        # Convert ngc_number back to string format if present
        ngc_number = data.get('ngc_number')
        ngc_str = f"NGC {ngc_number}" if ngc_number else None

        return cls(
            number=data['number'],
            name=data['name'],
            object_type=data['object_type'],
            ra_hours=data['ra_hours'],
            dec_degrees=data['dec_degrees'],
            magnitude=data['magnitude'],
            size_arcmin=data['size_arcmin'],
            distance_kly=data.get('distance_kly'),
            constellation=data['constellation'],
            ngc=ngc_str,
            description=data.get('description', ''),
        )


# Object type constants
GALAXY = "galaxy"
GLOBULAR_CLUSTER = "globular_cluster"
OPEN_CLUSTER = "open_cluster"
PLANETARY_NEBULA = "planetary_nebula"
EMISSION_NEBULA = "emission_nebula"
REFLECTION_NEBULA = "reflection_nebula"
SUPERNOVA_REMNANT = "supernova_remnant"
STAR_CLOUD = "star_cloud"
ASTERISM = "asterism"
DOUBLE_STAR = "double_star"


# Complete Messier catalog
# Coordinates are J2000.0 epoch
# RA in decimal hours, Dec in decimal degrees
MESSIER_DATA: Dict[int, MessierObject] = {
    1: MessierObject(
        number=1,
        name="Crab Nebula",
        object_type=SUPERNOVA_REMNANT,
        ra_hours=5.5753,
        dec_degrees=22.0145,
        magnitude=8.4,
        size_arcmin=6.0,
        distance_kly=6.5,
        constellation="Tau",
        ngc="NGC 1952",
        description="Supernova remnant from 1054 AD, contains a pulsar",
    ),
    2: MessierObject(
        number=2,
        name="Aquarius Globular Cluster",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=21.5583,
        dec_degrees=-0.8233,
        magnitude=6.3,
        size_arcmin=16.0,
        distance_kly=33.0,
        constellation="Aqr",
        ngc="NGC 7089",
        description="Rich globular cluster, one of the largest known",
    ),
    3: MessierObject(
        number=3,
        name="Canes Venatici Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=13.7033,
        dec_degrees=28.3772,
        magnitude=6.2,
        size_arcmin=18.0,
        distance_kly=33.9,
        constellation="CVn",
        ngc="NGC 5272",
        description="One of the brightest and largest globular clusters",
    ),
    4: MessierObject(
        number=4,
        name="Cat's Eye Cluster",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=16.3933,
        dec_degrees=-26.5258,
        magnitude=5.6,
        size_arcmin=36.0,
        distance_kly=7.2,
        constellation="Sco",
        ngc="NGC 6121",
        description="Nearest globular cluster to Earth",
    ),
    5: MessierObject(
        number=5,
        name="Rose Cluster",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=15.3097,
        dec_degrees=2.0828,
        magnitude=5.6,
        size_arcmin=23.0,
        distance_kly=24.5,
        constellation="Ser",
        ngc="NGC 5904",
        description="One of the finest globular clusters in the northern sky",
    ),
    6: MessierObject(
        number=6,
        name="Butterfly Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=17.6683,
        dec_degrees=-32.2167,
        magnitude=4.2,
        size_arcmin=25.0,
        distance_kly=1.6,
        constellation="Sco",
        ngc="NGC 6405",
        description="Bright open cluster resembling a butterfly",
    ),
    7: MessierObject(
        number=7,
        name="Ptolemy Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=17.8983,
        dec_degrees=-34.7933,
        magnitude=3.3,
        size_arcmin=80.0,
        distance_kly=0.98,
        constellation="Sco",
        ngc="NGC 6475",
        description="Bright open cluster known since antiquity",
    ),
    8: MessierObject(
        number=8,
        name="Lagoon Nebula",
        object_type=EMISSION_NEBULA,
        ra_hours=18.0633,
        dec_degrees=-24.3833,
        magnitude=6.0,
        size_arcmin=90.0,
        distance_kly=5.2,
        constellation="Sgr",
        ngc="NGC 6523",
        description="Giant interstellar cloud and H II region",
    ),
    9: MessierObject(
        number=9,
        name="Ophiuchus Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=17.3200,
        dec_degrees=-18.5167,
        magnitude=7.7,
        size_arcmin=12.0,
        distance_kly=25.8,
        constellation="Oph",
        ngc="NGC 6333",
        description="Globular cluster near the galactic center",
    ),
    10: MessierObject(
        number=10,
        name="Ophiuchus Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=16.9522,
        dec_degrees=-4.1000,
        magnitude=6.6,
        size_arcmin=20.0,
        distance_kly=14.3,
        constellation="Oph",
        ngc="NGC 6254",
        description="Bright globular cluster in Ophiuchus",
    ),
    11: MessierObject(
        number=11,
        name="Wild Duck Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=18.8517,
        dec_degrees=-6.2667,
        magnitude=5.8,
        size_arcmin=14.0,
        distance_kly=6.2,
        constellation="Sct",
        ngc="NGC 6705",
        description="One of the richest and most compact open clusters",
    ),
    12: MessierObject(
        number=12,
        name="Gumball Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=16.7867,
        dec_degrees=-1.9483,
        magnitude=6.7,
        size_arcmin=16.0,
        distance_kly=15.7,
        constellation="Oph",
        ngc="NGC 6218",
        description="Loose globular cluster with many resolved stars",
    ),
    13: MessierObject(
        number=13,
        name="Hercules Globular Cluster",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=16.6947,
        dec_degrees=36.4617,
        magnitude=5.8,
        size_arcmin=20.0,
        distance_kly=25.1,
        constellation="Her",
        ngc="NGC 6205",
        description="Great Globular Cluster, one of the finest in the northern sky",
    ),
    14: MessierObject(
        number=14,
        name="Ophiuchus Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=17.6267,
        dec_degrees=-3.2458,
        magnitude=7.6,
        size_arcmin=11.0,
        distance_kly=30.3,
        constellation="Oph",
        ngc="NGC 6402",
        description="Slightly elliptical globular cluster",
    ),
    15: MessierObject(
        number=15,
        name="Pegasus Globular Cluster",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=21.4997,
        dec_degrees=12.1672,
        magnitude=6.2,
        size_arcmin=18.0,
        distance_kly=33.6,
        constellation="Peg",
        ngc="NGC 7078",
        description="Dense globular cluster with possible central black hole",
    ),
    16: MessierObject(
        number=16,
        name="Eagle Nebula",
        object_type=EMISSION_NEBULA,
        ra_hours=18.3133,
        dec_degrees=-13.7833,
        magnitude=6.0,
        size_arcmin=35.0,
        distance_kly=7.0,
        constellation="Ser",
        ngc="NGC 6611",
        description="Star-forming region with the famous Pillars of Creation",
    ),
    17: MessierObject(
        number=17,
        name="Omega Nebula",
        object_type=EMISSION_NEBULA,
        ra_hours=18.3467,
        dec_degrees=-16.1833,
        magnitude=6.0,
        size_arcmin=46.0,
        distance_kly=5.5,
        constellation="Sgr",
        ngc="NGC 6618",
        description="Also known as Swan Nebula or Horseshoe Nebula",
    ),
    18: MessierObject(
        number=18,
        name="Black Swan Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=18.3317,
        dec_degrees=-17.1333,
        magnitude=6.9,
        size_arcmin=9.0,
        distance_kly=4.9,
        constellation="Sgr",
        ngc="NGC 6613",
        description="Small open cluster near M17",
    ),
    19: MessierObject(
        number=19,
        name="Ophiuchus Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=17.0433,
        dec_degrees=-26.2667,
        magnitude=6.8,
        size_arcmin=17.0,
        distance_kly=28.7,
        constellation="Oph",
        ngc="NGC 6273",
        description="One of the most oblate globular clusters known",
    ),
    20: MessierObject(
        number=20,
        name="Trifid Nebula",
        object_type=EMISSION_NEBULA,
        ra_hours=18.0433,
        dec_degrees=-23.0333,
        magnitude=6.3,
        size_arcmin=28.0,
        distance_kly=5.2,
        constellation="Sgr",
        ngc="NGC 6514",
        description="Combination emission, reflection, and dark nebula",
    ),
    21: MessierObject(
        number=21,
        name="Webb's Cross Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=18.0767,
        dec_degrees=-22.5000,
        magnitude=5.9,
        size_arcmin=13.0,
        distance_kly=4.25,
        constellation="Sgr",
        ngc="NGC 6531",
        description="Small open cluster near the Trifid Nebula",
    ),
    22: MessierObject(
        number=22,
        name="Sagittarius Cluster",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=18.6067,
        dec_degrees=-23.9033,
        magnitude=5.1,
        size_arcmin=32.0,
        distance_kly=10.4,
        constellation="Sgr",
        ngc="NGC 6656",
        description="One of the brightest globular clusters in the sky",
    ),
    23: MessierObject(
        number=23,
        name="Sagittarius Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=17.9483,
        dec_degrees=-19.0167,
        magnitude=5.5,
        size_arcmin=27.0,
        distance_kly=2.15,
        constellation="Sgr",
        ngc="NGC 6494",
        description="Bright, loose open cluster",
    ),
    24: MessierObject(
        number=24,
        name="Sagittarius Star Cloud",
        object_type=STAR_CLOUD,
        ra_hours=18.2833,
        dec_degrees=-18.5167,
        magnitude=4.6,
        size_arcmin=90.0,
        distance_kly=10.0,
        constellation="Sgr",
        ngc=None,
        description="Milky Way star cloud, not a true deep sky object",
    ),
    25: MessierObject(
        number=25,
        name="Sagittarius Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=18.5267,
        dec_degrees=-19.2500,
        magnitude=4.6,
        size_arcmin=32.0,
        distance_kly=2.0,
        constellation="Sgr",
        ngc="IC 4725",
        description="Bright open cluster with Cepheid variable U Sgr",
    ),
    26: MessierObject(
        number=26,
        name="Scutum Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=18.7533,
        dec_degrees=-9.4000,
        magnitude=8.0,
        size_arcmin=15.0,
        distance_kly=5.0,
        constellation="Sct",
        ngc="NGC 6694",
        description="Open cluster in a rich star field",
    ),
    27: MessierObject(
        number=27,
        name="Dumbbell Nebula",
        object_type=PLANETARY_NEBULA,
        ra_hours=19.9933,
        dec_degrees=22.7217,
        magnitude=7.4,
        size_arcmin=8.0,
        distance_kly=1.36,
        constellation="Vul",
        ngc="NGC 6853",
        description="First planetary nebula discovered, very bright",
    ),
    28: MessierObject(
        number=28,
        name="Sagittarius Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=18.4100,
        dec_degrees=-24.8700,
        magnitude=6.8,
        size_arcmin=11.0,
        distance_kly=17.9,
        constellation="Sgr",
        ngc="NGC 6626",
        description="Globular cluster with first discovered millisecond pulsar",
    ),
    29: MessierObject(
        number=29,
        name="Cooling Tower",
        object_type=OPEN_CLUSTER,
        ra_hours=20.3983,
        dec_degrees=38.5167,
        magnitude=6.6,
        size_arcmin=7.0,
        distance_kly=4.0,
        constellation="Cyg",
        ngc="NGC 6913",
        description="Small open cluster in Cygnus",
    ),
    30: MessierObject(
        number=30,
        name="Capricornus Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=21.6733,
        dec_degrees=-23.1800,
        magnitude=7.2,
        size_arcmin=12.0,
        distance_kly=26.1,
        constellation="Cap",
        ngc="NGC 7099",
        description="Globular cluster that has undergone core collapse",
    ),
    31: MessierObject(
        number=31,
        name="Andromeda Galaxy",
        object_type=GALAXY,
        ra_hours=0.7123,
        dec_degrees=41.2689,
        magnitude=3.4,
        size_arcmin=178.0,
        distance_kly=2540.0,
        constellation="And",
        ngc="NGC 224",
        description="Nearest major galaxy to the Milky Way",
    ),
    32: MessierObject(
        number=32,
        name="Le Gentil",
        object_type=GALAXY,
        ra_hours=0.7111,
        dec_degrees=40.8653,
        magnitude=8.1,
        size_arcmin=8.0,
        distance_kly=2490.0,
        constellation="And",
        ngc="NGC 221",
        description="Dwarf elliptical satellite of Andromeda Galaxy",
    ),
    33: MessierObject(
        number=33,
        name="Triangulum Galaxy",
        object_type=GALAXY,
        ra_hours=1.5642,
        dec_degrees=30.6597,
        magnitude=5.7,
        size_arcmin=73.0,
        distance_kly=2730.0,
        constellation="Tri",
        ngc="NGC 598",
        description="Third-largest galaxy in the Local Group",
    ),
    34: MessierObject(
        number=34,
        name="Perseus Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=2.7017,
        dec_degrees=42.7833,
        magnitude=5.2,
        size_arcmin=35.0,
        distance_kly=1.5,
        constellation="Per",
        ngc="NGC 1039",
        description="Bright open cluster visible to naked eye",
    ),
    35: MessierObject(
        number=35,
        name="Gemini Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=6.1483,
        dec_degrees=24.3333,
        magnitude=5.1,
        size_arcmin=28.0,
        distance_kly=2.8,
        constellation="Gem",
        ngc="NGC 2168",
        description="Large, bright open cluster near Castor",
    ),
    36: MessierObject(
        number=36,
        name="Pinwheel Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=5.6017,
        dec_degrees=34.1333,
        magnitude=6.0,
        size_arcmin=12.0,
        distance_kly=4.1,
        constellation="Aur",
        ngc="NGC 1960",
        description="Open cluster in Auriga",
    ),
    37: MessierObject(
        number=37,
        name="Salt and Pepper Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=5.8733,
        dec_degrees=32.5500,
        magnitude=5.6,
        size_arcmin=24.0,
        distance_kly=4.5,
        constellation="Aur",
        ngc="NGC 2099",
        description="Richest open cluster in Auriga",
    ),
    38: MessierObject(
        number=38,
        name="Starfish Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=5.4783,
        dec_degrees=35.8333,
        magnitude=6.4,
        size_arcmin=21.0,
        distance_kly=4.2,
        constellation="Aur",
        ngc="NGC 1912",
        description="Open cluster with cross-shaped pattern",
    ),
    39: MessierObject(
        number=39,
        name="Cygnus Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=21.5350,
        dec_degrees=48.4333,
        magnitude=4.6,
        size_arcmin=32.0,
        distance_kly=0.82,
        constellation="Cyg",
        ngc="NGC 7092",
        description="Nearby loose open cluster",
    ),
    40: MessierObject(
        number=40,
        name="Winnecke 4",
        object_type=DOUBLE_STAR,
        ra_hours=12.3717,
        dec_degrees=58.0833,
        magnitude=8.4,
        size_arcmin=0.8,
        distance_kly=None,
        constellation="UMa",
        ngc=None,
        description="Double star, not a deep sky object",
    ),
    41: MessierObject(
        number=41,
        name="Little Beehive Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=6.7617,
        dec_degrees=-20.7333,
        magnitude=4.5,
        size_arcmin=38.0,
        distance_kly=2.3,
        constellation="CMa",
        ngc="NGC 2287",
        description="Bright open cluster south of Sirius",
    ),
    42: MessierObject(
        number=42,
        name="Orion Nebula",
        object_type=EMISSION_NEBULA,
        ra_hours=5.5908,
        dec_degrees=-5.3911,
        magnitude=4.0,
        size_arcmin=85.0,
        distance_kly=1.34,
        constellation="Ori",
        ngc="NGC 1976",
        description="Brightest nebula in the sky, major star-forming region",
    ),
    43: MessierObject(
        number=43,
        name="De Mairan's Nebula",
        object_type=EMISSION_NEBULA,
        ra_hours=5.5933,
        dec_degrees=-5.2667,
        magnitude=9.0,
        size_arcmin=20.0,
        distance_kly=1.6,
        constellation="Ori",
        ngc="NGC 1982",
        description="Part of the Orion Nebula complex",
    ),
    44: MessierObject(
        number=44,
        name="Beehive Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=8.6700,
        dec_degrees=19.9833,
        magnitude=3.1,
        size_arcmin=95.0,
        distance_kly=0.61,
        constellation="Cnc",
        ngc="NGC 2632",
        description="Also known as Praesepe, visible to naked eye",
    ),
    45: MessierObject(
        number=45,
        name="Pleiades",
        object_type=OPEN_CLUSTER,
        ra_hours=3.7867,
        dec_degrees=24.1167,
        magnitude=1.6,
        size_arcmin=110.0,
        distance_kly=0.44,
        constellation="Tau",
        ngc=None,
        description="Seven Sisters, one of the nearest open clusters",
    ),
    46: MessierObject(
        number=46,
        name="Puppis Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=7.6967,
        dec_degrees=-14.8167,
        magnitude=6.1,
        size_arcmin=27.0,
        distance_kly=5.5,
        constellation="Pup",
        ngc="NGC 2437",
        description="Rich open cluster with planetary nebula NGC 2438",
    ),
    47: MessierObject(
        number=47,
        name="Puppis Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=7.6100,
        dec_degrees=-14.5000,
        magnitude=4.4,
        size_arcmin=30.0,
        distance_kly=1.6,
        constellation="Pup",
        ngc="NGC 2422",
        description="Bright open cluster near M46",
    ),
    48: MessierObject(
        number=48,
        name="Hydra Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=8.2267,
        dec_degrees=-5.8000,
        magnitude=5.8,
        size_arcmin=54.0,
        distance_kly=1.5,
        constellation="Hya",
        ngc="NGC 2548",
        description="Large, scattered open cluster",
    ),
    49: MessierObject(
        number=49,
        name="Virgo A",
        object_type=GALAXY,
        ra_hours=12.4964,
        dec_degrees=8.0003,
        magnitude=8.4,
        size_arcmin=10.0,
        distance_kly=55900.0,
        constellation="Vir",
        ngc="NGC 4472",
        description="Brightest galaxy in the Virgo Cluster",
    ),
    50: MessierObject(
        number=50,
        name="Heart-Shaped Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=7.0467,
        dec_degrees=-8.3500,
        magnitude=5.9,
        size_arcmin=16.0,
        distance_kly=2.9,
        constellation="Mon",
        ngc="NGC 2323",
        description="Heart-shaped open cluster",
    ),
    51: MessierObject(
        number=51,
        name="Whirlpool Galaxy",
        object_type=GALAXY,
        ra_hours=13.4983,
        dec_degrees=47.1950,
        magnitude=8.4,
        size_arcmin=11.0,
        distance_kly=31000.0,
        constellation="CVn",
        ngc="NGC 5194",
        description="Classic spiral galaxy with companion NGC 5195",
    ),
    52: MessierObject(
        number=52,
        name="Cassiopeia Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=23.4067,
        dec_degrees=61.5833,
        magnitude=6.9,
        size_arcmin=13.0,
        distance_kly=5.0,
        constellation="Cas",
        ngc="NGC 7654",
        description="Rich open cluster in Cassiopeia",
    ),
    53: MessierObject(
        number=53,
        name="Coma Berenices Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=13.2150,
        dec_degrees=18.1692,
        magnitude=7.6,
        size_arcmin=13.0,
        distance_kly=58.0,
        constellation="Com",
        ngc="NGC 5024",
        description="One of the more outlying globular clusters",
    ),
    54: MessierObject(
        number=54,
        name="Sagittarius Dwarf Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=18.9175,
        dec_degrees=-30.4783,
        magnitude=7.6,
        size_arcmin=12.0,
        distance_kly=87.4,
        constellation="Sgr",
        ngc="NGC 6715",
        description="Belongs to Sagittarius Dwarf Elliptical Galaxy",
    ),
    55: MessierObject(
        number=55,
        name="Summer Rose Star",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=19.6667,
        dec_degrees=-30.9617,
        magnitude=6.3,
        size_arcmin=19.0,
        distance_kly=17.6,
        constellation="Sgr",
        ngc="NGC 6809",
        description="Large, loose globular cluster",
    ),
    56: MessierObject(
        number=56,
        name="Lyra Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=19.2767,
        dec_degrees=30.1833,
        magnitude=8.3,
        size_arcmin=8.8,
        distance_kly=32.9,
        constellation="Lyr",
        ngc="NGC 6779",
        description="Small, dense globular cluster",
    ),
    57: MessierObject(
        number=57,
        name="Ring Nebula",
        object_type=PLANETARY_NEBULA,
        ra_hours=18.8933,
        dec_degrees=33.0286,
        magnitude=8.8,
        size_arcmin=1.4,
        distance_kly=2.3,
        constellation="Lyr",
        ngc="NGC 6720",
        description="Classic ring-shaped planetary nebula",
    ),
    58: MessierObject(
        number=58,
        name="Virgo Galaxy",
        object_type=GALAXY,
        ra_hours=12.6264,
        dec_degrees=11.8175,
        magnitude=9.7,
        size_arcmin=6.0,
        distance_kly=60000.0,
        constellation="Vir",
        ngc="NGC 4579",
        description="Barred spiral galaxy in Virgo Cluster",
    ),
    59: MessierObject(
        number=59,
        name="Virgo Galaxy",
        object_type=GALAXY,
        ra_hours=12.7000,
        dec_degrees=11.6472,
        magnitude=9.6,
        size_arcmin=5.0,
        distance_kly=60000.0,
        constellation="Vir",
        ngc="NGC 4621",
        description="Elliptical galaxy in Virgo Cluster",
    ),
    60: MessierObject(
        number=60,
        name="Virgo Galaxy",
        object_type=GALAXY,
        ra_hours=12.7286,
        dec_degrees=11.5528,
        magnitude=8.8,
        size_arcmin=7.0,
        distance_kly=55000.0,
        constellation="Vir",
        ngc="NGC 4649",
        description="Giant elliptical galaxy in Virgo Cluster",
    ),
    61: MessierObject(
        number=61,
        name="Virgo Galaxy",
        object_type=GALAXY,
        ra_hours=12.3642,
        dec_degrees=4.4736,
        magnitude=9.7,
        size_arcmin=6.0,
        distance_kly=52500.0,
        constellation="Vir",
        ngc="NGC 4303",
        description="Spiral galaxy with high supernova rate",
    ),
    62: MessierObject(
        number=62,
        name="Flickering Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=17.0217,
        dec_degrees=-30.1133,
        magnitude=6.5,
        size_arcmin=15.0,
        distance_kly=22.5,
        constellation="Oph",
        ngc="NGC 6266",
        description="One of the most irregularly shaped globulars",
    ),
    63: MessierObject(
        number=63,
        name="Sunflower Galaxy",
        object_type=GALAXY,
        ra_hours=13.2639,
        dec_degrees=42.0294,
        magnitude=8.6,
        size_arcmin=13.0,
        distance_kly=37000.0,
        constellation="CVn",
        ngc="NGC 5055",
        description="Flocculent spiral galaxy",
    ),
    64: MessierObject(
        number=64,
        name="Black Eye Galaxy",
        object_type=GALAXY,
        ra_hours=12.9478,
        dec_degrees=21.6822,
        magnitude=8.5,
        size_arcmin=10.0,
        distance_kly=17000.0,
        constellation="Com",
        ngc="NGC 4826",
        description="Spiral galaxy with dark dust band",
    ),
    65: MessierObject(
        number=65,
        name="Leo Triplet Galaxy",
        object_type=GALAXY,
        ra_hours=11.3150,
        dec_degrees=13.0922,
        magnitude=9.3,
        size_arcmin=10.0,
        distance_kly=35000.0,
        constellation="Leo",
        ngc="NGC 3623",
        description="Member of the Leo Triplet with M66 and NGC 3628",
    ),
    66: MessierObject(
        number=66,
        name="Leo Triplet Galaxy",
        object_type=GALAXY,
        ra_hours=11.3367,
        dec_degrees=12.9917,
        magnitude=8.9,
        size_arcmin=9.0,
        distance_kly=35000.0,
        constellation="Leo",
        ngc="NGC 3627",
        description="Member of the Leo Triplet with M65 and NGC 3628",
    ),
    67: MessierObject(
        number=67,
        name="King Cobra Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=8.8533,
        dec_degrees=11.8167,
        magnitude=6.9,
        size_arcmin=30.0,
        distance_kly=2.6,
        constellation="Cnc",
        ngc="NGC 2682",
        description="One of the oldest known open clusters",
    ),
    68: MessierObject(
        number=68,
        name="Hydra Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=12.6550,
        dec_degrees=-26.7447,
        magnitude=7.8,
        size_arcmin=11.0,
        distance_kly=33.3,
        constellation="Hya",
        ngc="NGC 4590",
        description="Southern globular cluster",
    ),
    69: MessierObject(
        number=69,
        name="Sagittarius Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=18.5233,
        dec_degrees=-32.3483,
        magnitude=7.6,
        size_arcmin=9.8,
        distance_kly=29.7,
        constellation="Sgr",
        ngc="NGC 6637",
        description="Small, bright globular near galactic center",
    ),
    70: MessierObject(
        number=70,
        name="Sagittarius Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=18.7200,
        dec_degrees=-32.2917,
        magnitude=7.9,
        size_arcmin=8.0,
        distance_kly=29.4,
        constellation="Sgr",
        ngc="NGC 6681",
        description="Compact globular similar to M69",
    ),
    71: MessierObject(
        number=71,
        name="Sagitta Cluster",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=19.8967,
        dec_degrees=18.7783,
        magnitude=8.2,
        size_arcmin=7.2,
        distance_kly=13.0,
        constellation="Sge",
        ngc="NGC 6838",
        description="Loose globular, sometimes classified as open cluster",
    ),
    72: MessierObject(
        number=72,
        name="Aquarius Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=20.8917,
        dec_degrees=-12.5367,
        magnitude=9.3,
        size_arcmin=6.6,
        distance_kly=55.4,
        constellation="Aqr",
        ngc="NGC 6981",
        description="Distant, loose globular cluster",
    ),
    73: MessierObject(
        number=73,
        name="Aquarius Asterism",
        object_type=ASTERISM,
        ra_hours=20.9867,
        dec_degrees=-12.6333,
        magnitude=9.0,
        size_arcmin=2.8,
        distance_kly=None,
        constellation="Aqr",
        ngc="NGC 6994",
        description="Four unrelated stars, not a true cluster",
    ),
    74: MessierObject(
        number=74,
        name="Phantom Galaxy",
        object_type=GALAXY,
        ra_hours=1.6117,
        dec_degrees=15.7833,
        magnitude=9.4,
        size_arcmin=10.5,
        distance_kly=35000.0,
        constellation="Psc",
        ngc="NGC 628",
        description="Face-on spiral galaxy with low surface brightness",
    ),
    75: MessierObject(
        number=75,
        name="Sagittarius Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=20.1017,
        dec_degrees=-21.9217,
        magnitude=8.5,
        size_arcmin=6.8,
        distance_kly=67.5,
        constellation="Sgr",
        ngc="NGC 6864",
        description="Very concentrated, distant globular",
    ),
    76: MessierObject(
        number=76,
        name="Little Dumbbell Nebula",
        object_type=PLANETARY_NEBULA,
        ra_hours=1.7050,
        dec_degrees=51.5750,
        magnitude=10.1,
        size_arcmin=2.7,
        distance_kly=2.5,
        constellation="Per",
        ngc="NGC 650",
        description="Bipolar planetary nebula resembling M27",
    ),
    77: MessierObject(
        number=77,
        name="Cetus A",
        object_type=GALAXY,
        ra_hours=2.7111,
        dec_degrees=-0.0133,
        magnitude=8.9,
        size_arcmin=7.0,
        distance_kly=47000.0,
        constellation="Cet",
        ngc="NGC 1068",
        description="Seyfert galaxy with active nucleus",
    ),
    78: MessierObject(
        number=78,
        name="Orion Reflection Nebula",
        object_type=REFLECTION_NEBULA,
        ra_hours=5.7800,
        dec_degrees=0.0500,
        magnitude=8.3,
        size_arcmin=8.0,
        distance_kly=1.6,
        constellation="Ori",
        ngc="NGC 2068",
        description="Brightest diffuse reflection nebula in the sky",
    ),
    79: MessierObject(
        number=79,
        name="Lepus Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=5.4050,
        dec_degrees=-24.5250,
        magnitude=7.7,
        size_arcmin=9.6,
        distance_kly=42.1,
        constellation="Lep",
        ngc="NGC 1904",
        description="Winter globular cluster",
    ),
    80: MessierObject(
        number=80,
        name="Scorpius Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=16.2850,
        dec_degrees=-22.9758,
        magnitude=7.3,
        size_arcmin=10.0,
        distance_kly=32.6,
        constellation="Sco",
        ngc="NGC 6093",
        description="Dense globular with bright core",
    ),
    81: MessierObject(
        number=81,
        name="Bode's Galaxy",
        object_type=GALAXY,
        ra_hours=9.9256,
        dec_degrees=69.0653,
        magnitude=6.9,
        size_arcmin=27.0,
        distance_kly=11800.0,
        constellation="UMa",
        ngc="NGC 3031",
        description="Grand design spiral, interacting with M82",
    ),
    82: MessierObject(
        number=82,
        name="Cigar Galaxy",
        object_type=GALAXY,
        ra_hours=9.9317,
        dec_degrees=69.6797,
        magnitude=8.4,
        size_arcmin=11.0,
        distance_kly=11500.0,
        constellation="UMa",
        ngc="NGC 3034",
        description="Starburst galaxy interacting with M81",
    ),
    83: MessierObject(
        number=83,
        name="Southern Pinwheel Galaxy",
        object_type=GALAXY,
        ra_hours=13.6167,
        dec_degrees=-29.8656,
        magnitude=7.6,
        size_arcmin=13.0,
        distance_kly=14700.0,
        constellation="Hya",
        ngc="NGC 5236",
        description="Face-on barred spiral, prolific supernova producer",
    ),
    84: MessierObject(
        number=84,
        name="Virgo Galaxy",
        object_type=GALAXY,
        ra_hours=12.4167,
        dec_degrees=12.8869,
        magnitude=9.1,
        size_arcmin=6.0,
        distance_kly=60000.0,
        constellation="Vir",
        ngc="NGC 4374",
        description="Lenticular galaxy in Virgo Cluster",
    ),
    85: MessierObject(
        number=85,
        name="Coma Berenices Galaxy",
        object_type=GALAXY,
        ra_hours=12.4250,
        dec_degrees=18.1911,
        magnitude=9.1,
        size_arcmin=7.0,
        distance_kly=60000.0,
        constellation="Com",
        ngc="NGC 4382",
        description="Lenticular galaxy with recent merger history",
    ),
    86: MessierObject(
        number=86,
        name="Virgo Galaxy",
        object_type=GALAXY,
        ra_hours=12.4361,
        dec_degrees=12.9469,
        magnitude=8.9,
        size_arcmin=9.0,
        distance_kly=52000.0,
        constellation="Vir",
        ngc="NGC 4406",
        description="Giant elliptical in Virgo Cluster, blueshifted",
    ),
    87: MessierObject(
        number=87,
        name="Virgo A",
        object_type=GALAXY,
        ra_hours=12.5139,
        dec_degrees=12.3911,
        magnitude=8.6,
        size_arcmin=8.0,
        distance_kly=53500.0,
        constellation="Vir",
        ngc="NGC 4486",
        description="Giant elliptical with famous jet and black hole",
    ),
    88: MessierObject(
        number=88,
        name="Coma Berenices Galaxy",
        object_type=GALAXY,
        ra_hours=12.5328,
        dec_degrees=14.4203,
        magnitude=9.6,
        size_arcmin=7.0,
        distance_kly=47000.0,
        constellation="Com",
        ngc="NGC 4501",
        description="Spiral galaxy in Virgo Cluster",
    ),
    89: MessierObject(
        number=89,
        name="Virgo Galaxy",
        object_type=GALAXY,
        ra_hours=12.5928,
        dec_degrees=12.5564,
        magnitude=9.8,
        size_arcmin=5.0,
        distance_kly=50000.0,
        constellation="Vir",
        ngc="NGC 4552",
        description="Almost perfectly spherical elliptical galaxy",
    ),
    90: MessierObject(
        number=90,
        name="Virgo Galaxy",
        object_type=GALAXY,
        ra_hours=12.6133,
        dec_degrees=13.1628,
        magnitude=9.5,
        size_arcmin=10.0,
        distance_kly=59000.0,
        constellation="Vir",
        ngc="NGC 4569",
        description="Spiral galaxy moving toward us",
    ),
    91: MessierObject(
        number=91,
        name="Coma Berenices Galaxy",
        object_type=GALAXY,
        ra_hours=12.5917,
        dec_degrees=14.4967,
        magnitude=10.2,
        size_arcmin=5.0,
        distance_kly=63000.0,
        constellation="Com",
        ngc="NGC 4548",
        description="Barred spiral in Virgo Cluster",
    ),
    92: MessierObject(
        number=92,
        name="Hercules Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=17.2850,
        dec_degrees=43.1364,
        magnitude=6.4,
        size_arcmin=14.0,
        distance_kly=26.7,
        constellation="Her",
        ngc="NGC 6341",
        description="Often overlooked neighbor of M13",
    ),
    93: MessierObject(
        number=93,
        name="Puppis Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=7.7433,
        dec_degrees=-23.8500,
        magnitude=6.2,
        size_arcmin=22.0,
        distance_kly=3.6,
        constellation="Pup",
        ngc="NGC 2447",
        description="Bright open cluster in Puppis",
    ),
    94: MessierObject(
        number=94,
        name="Cat's Eye Galaxy",
        object_type=GALAXY,
        ra_hours=12.8508,
        dec_degrees=41.1203,
        magnitude=8.2,
        size_arcmin=14.0,
        distance_kly=16000.0,
        constellation="CVn",
        ngc="NGC 4736",
        description="Spiral galaxy with bright inner ring",
    ),
    95: MessierObject(
        number=95,
        name="Leo Galaxy",
        object_type=GALAXY,
        ra_hours=10.7317,
        dec_degrees=11.7036,
        magnitude=9.7,
        size_arcmin=7.0,
        distance_kly=33000.0,
        constellation="Leo",
        ngc="NGC 3351",
        description="Barred spiral galaxy in Leo",
    ),
    96: MessierObject(
        number=96,
        name="Leo Galaxy",
        object_type=GALAXY,
        ra_hours=10.7822,
        dec_degrees=11.8197,
        magnitude=9.3,
        size_arcmin=7.0,
        distance_kly=31000.0,
        constellation="Leo",
        ngc="NGC 3368",
        description="Spiral galaxy in Leo I Group",
    ),
    97: MessierObject(
        number=97,
        name="Owl Nebula",
        object_type=PLANETARY_NEBULA,
        ra_hours=11.2467,
        dec_degrees=55.0183,
        magnitude=9.9,
        size_arcmin=3.4,
        distance_kly=2.6,
        constellation="UMa",
        ngc="NGC 3587",
        description="Large planetary nebula with owl-like eyes",
    ),
    98: MessierObject(
        number=98,
        name="Coma Berenices Galaxy",
        object_type=GALAXY,
        ra_hours=12.2283,
        dec_degrees=14.9003,
        magnitude=10.1,
        size_arcmin=10.0,
        distance_kly=44000.0,
        constellation="Com",
        ngc="NGC 4192",
        description="Edge-on spiral in Virgo Cluster",
    ),
    99: MessierObject(
        number=99,
        name="Coma Pinwheel Galaxy",
        object_type=GALAXY,
        ra_hours=12.3133,
        dec_degrees=14.4164,
        magnitude=9.9,
        size_arcmin=5.0,
        distance_kly=45000.0,
        constellation="Com",
        ngc="NGC 4254",
        description="Nearly face-on spiral with asymmetric arms",
    ),
    100: MessierObject(
        number=100,
        name="Mirror Galaxy",
        object_type=GALAXY,
        ra_hours=12.3828,
        dec_degrees=15.8211,
        magnitude=9.3,
        size_arcmin=7.0,
        distance_kly=55000.0,
        constellation="Com",
        ngc="NGC 4321",
        description="Grand design spiral in Virgo Cluster",
    ),
    101: MessierObject(
        number=101,
        name="Pinwheel Galaxy",
        object_type=GALAXY,
        ra_hours=14.0533,
        dec_degrees=54.3489,
        magnitude=7.9,
        size_arcmin=29.0,
        distance_kly=20900.0,
        constellation="UMa",
        ngc="NGC 5457",
        description="Large face-on spiral galaxy",
    ),
    102: MessierObject(
        number=102,
        name="Spindle Galaxy",
        object_type=GALAXY,
        ra_hours=15.1100,
        dec_degrees=55.7633,
        magnitude=9.9,
        size_arcmin=6.0,
        distance_kly=50000.0,
        constellation="Dra",
        ngc="NGC 5866",
        description="Edge-on lenticular galaxy (disputed identification)",
    ),
    103: MessierObject(
        number=103,
        name="Cassiopeia Cluster",
        object_type=OPEN_CLUSTER,
        ra_hours=1.5567,
        dec_degrees=60.6500,
        magnitude=7.4,
        size_arcmin=6.0,
        distance_kly=8.5,
        constellation="Cas",
        ngc="NGC 581",
        description="Open cluster with fan-shaped pattern",
    ),
    104: MessierObject(
        number=104,
        name="Sombrero Galaxy",
        object_type=GALAXY,
        ra_hours=12.6658,
        dec_degrees=-11.6228,
        magnitude=8.0,
        size_arcmin=9.0,
        distance_kly=29500.0,
        constellation="Vir",
        ngc="NGC 4594",
        description="Edge-on spiral with prominent dust lane and bulge",
    ),
    105: MessierObject(
        number=105,
        name="Leo Galaxy",
        object_type=GALAXY,
        ra_hours=10.7922,
        dec_degrees=12.5819,
        magnitude=9.3,
        size_arcmin=5.0,
        distance_kly=32000.0,
        constellation="Leo",
        ngc="NGC 3379",
        description="Elliptical galaxy in Leo I Group",
    ),
    106: MessierObject(
        number=106,
        name="Canes Venatici Galaxy",
        object_type=GALAXY,
        ra_hours=12.3153,
        dec_degrees=47.3039,
        magnitude=8.4,
        size_arcmin=19.0,
        distance_kly=23500.0,
        constellation="CVn",
        ngc="NGC 4258",
        description="Seyfert galaxy with water maser",
    ),
    107: MessierObject(
        number=107,
        name="Ophiuchus Globular",
        object_type=GLOBULAR_CLUSTER,
        ra_hours=16.5417,
        dec_degrees=-13.0536,
        magnitude=7.9,
        size_arcmin=13.0,
        distance_kly=20.9,
        constellation="Oph",
        ngc="NGC 6171",
        description="Loose globular cluster",
    ),
    108: MessierObject(
        number=108,
        name="Surfboard Galaxy",
        object_type=GALAXY,
        ra_hours=11.1867,
        dec_degrees=55.6742,
        magnitude=10.0,
        size_arcmin=8.0,
        distance_kly=45000.0,
        constellation="UMa",
        ngc="NGC 3556",
        description="Edge-on barred spiral near M97",
    ),
    109: MessierObject(
        number=109,
        name="Vacuum Cleaner Galaxy",
        object_type=GALAXY,
        ra_hours=11.9600,
        dec_degrees=53.3747,
        magnitude=9.8,
        size_arcmin=8.0,
        distance_kly=83500.0,
        constellation="UMa",
        ngc="NGC 3992",
        description="Barred spiral under the Big Dipper",
    ),
    110: MessierObject(
        number=110,
        name="Edward Young Star",
        object_type=GALAXY,
        ra_hours=0.6733,
        dec_degrees=41.6853,
        magnitude=8.5,
        size_arcmin=17.0,
        distance_kly=2690.0,
        constellation="And",
        ngc="NGC 205",
        description="Dwarf elliptical satellite of Andromeda Galaxy",
    ),
}
