Skip to main content

Catalog Modules

starward provides Python access to major astronomical catalogs for deep-sky objects and bright stars.

Available Catalogs

ModuleCatalogObjectsDescription
messierMessier110Classic deep-sky catalog
ngcNGC~7,840New General Catalogue
icIC~5,386Index Catalogue
caldwellCaldwell109Patrick Moore's catalog
hipparcosHipparcos~9,100Bright star catalog

Common Interface

All catalog modules share a consistent interface:

# Singleton instance
CATALOG.get(number) # Get object by number
CATALOG.list_all() # List all objects
CATALOG.search(query) # Search by text
CATALOG.filter_by_type(type) # Filter by object type
CATALOG.filter_by_constellation(code) # Filter by constellation
CATALOG.filter_by_magnitude(max_mag) # Filter by brightness
CATALOG.stats() # Catalog statistics

# Coordinate functions
catalog_coords(number) # Get ICRSCoord
catalog_altitude(number, observer, jd) # Current altitude
catalog_transit_altitude(number, observer) # Transit altitude

Messier Catalog

The 110 Messier objects—the finest deep-sky objects visible from mid-northern latitudes.

Basic Usage

from starward.core.messier import MESSIER, messier_coords

# Get the Andromeda Galaxy
m31 = MESSIER.get(31)
print(f"{m31.name}: {m31.object_type}")
print(f"Magnitude: {m31.magnitude}")
print(f"Constellation: {m31.constellation}")

# Get coordinates
coords = messier_coords(31)
print(f"RA: {coords.ra.hours:.4f}h")
print(f"Dec: {coords.dec.degrees:.4f}°")

MessierObject Properties

PropertyTypeDescription
numberintMessier number (1-110)
namestrCommon name
object_typestrType (galaxy, nebula, cluster, etc.)
constellationstrIAU 3-letter code
ra_hoursfloatRight ascension in hours
dec_degreesfloatDeclination in degrees
magnitudefloatVisual magnitude
size_arcminfloatAngular size in arcminutes
distance_klyfloatDistance in thousands of light-years
ngcintNGC catalog number

Searching and Filtering

from starward.core.messier import MESSIER

# Search by name or description
results = MESSIER.search("orion")
results = MESSIER.search("ring nebula")

# Filter by type
galaxies = MESSIER.filter_by_type("galaxy")
globulars = MESSIER.filter_by_type("globular_cluster")
planetaries = MESSIER.filter_by_type("planetary_nebula")

# Filter by constellation
sgr_objects = MESSIER.filter_by_constellation("Sgr")

# Filter by brightness
naked_eye = MESSIER.filter_by_magnitude(6.0)
binocular = MESSIER.filter_by_magnitude(8.0)

Visibility Calculations

from starward.core.messier import messier_altitude, messier_transit_altitude
from starward.core.observer import Observer
from starward.core.time import jd_now

observer = Observer.from_degrees("Home", 40.7, -74.0)
jd = jd_now()

# Current altitude
alt = messier_altitude(31, observer, jd)
print(f"M31 altitude: {alt.degrees:.1f}°")

# Maximum altitude (at transit)
transit_alt = messier_transit_altitude(31, observer)
print(f"M31 transit altitude: {transit_alt.degrees:.1f}°")

NGC Catalog

The New General Catalogue—the primary professional deep-sky reference.

Basic Usage

from starward.core.ngc import NGC, ngc_coords

# Get the North America Nebula
ngc7000 = NGC.get(7000)
print(f"{ngc7000.name}: {ngc7000.object_type}")

# Get M31 by NGC number
ngc224 = NGC.get(224)
print(f"NGC 224 is {ngc224.name}")

# Cross-reference Messier
m31_ngc = NGC.get_by_messier(31)
print(f"M31 = NGC {m31_ngc.number}")

NGCObject Properties

PropertyTypeDescription
numberintNGC number
namestrCommon name (if any)
object_typestrObject type
constellationstrIAU 3-letter code
ra_hoursfloatRight ascension
dec_degreesfloatDeclination
magnitudefloatVisual magnitude
size_arcminfloatAngular size
messier_numberintMessier number (if applicable)

Statistics

from starward.core.ngc import NGC

stats = NGC.stats()
print(f"Total objects: {stats['total']}")
print(f"By type: {stats['by_type']}")

IC Catalog

The Index Catalogue—a supplement to the NGC.

Basic Usage

from starward.core.ic import IC, ic_coords

# Get the Horsehead Nebula
ic434 = IC.get(434)
print(f"{ic434.name}: {ic434.object_type}")

# Famous IC objects
ic1805 = IC.get(1805) # Heart Nebula
ic1848 = IC.get(1848) # Soul Nebula

The IC module has the same interface as NGC.


Caldwell Catalog

Sir Patrick Moore's 109 deep-sky objects not in the Messier catalog.

Basic Usage

from starward.core.caldwell import Caldwell, caldwell_coords

# Get the Double Cluster
c14 = Caldwell.get(14)
print(f"{c14.name}: NGC {c14.ngc_number}")

# Get the Sculptor Galaxy
c65 = Caldwell.get(65)
print(f"{c65.name} in {c65.constellation}")

CaldwellObject Properties

PropertyTypeDescription
numberintCaldwell number (1-109)
namestrCommon name
object_typestrObject type
constellationstrIAU 3-letter code
ngc_numberintNGC cross-reference
magnitudefloatVisual magnitude

Hipparcos Star Catalog

Bright stars with precise astrometric data from ESA's Hipparcos satellite.

Basic Usage

from starward.core.hipparcos import Hipparcos, star_coords

# Get Sirius
sirius = Hipparcos.get(32349)
print(f"{sirius.name}: {sirius.spectral_type}")
print(f"Magnitude: {sirius.magnitude}")
print(f"Distance: {sirius.parallax_mas} mas")

# Find by name
vega = Hipparcos.get_by_name("Vega")
polaris = Hipparcos.get_by_name("Polaris")

# Find by Bayer designation
betelgeuse = Hipparcos.get_by_bayer("Alpha Orionis")

HIPStar Properties

PropertyTypeDescription
hip_numberintHipparcos catalog number
namestrCommon name
bayerstrBayer designation (e.g., "Alpha Lyrae")
constellationstrIAU 3-letter code
ra_hoursfloatRight ascension
dec_degreesfloatDeclination
magnitudefloatVisual magnitude
spectral_typestrFull spectral type (e.g., "A0V")
spectral_classstrSpectral class letter (e.g., "A")
bv_colorfloatB-V color index
parallax_masfloatParallax in milliarcseconds

Filtering by Spectral Type

from starward.core.hipparcos import Hipparcos

# Hot blue stars
b_stars = Hipparcos.filter_by_spectral_class("B")
a_stars = Hipparcos.filter_by_spectral_class("A")

# Cool red giants
k_giants = Hipparcos.filter_by_spectral_class("K")
m_giants = Hipparcos.filter_by_spectral_class("M")

# Named stars only
named = Hipparcos.filter_named()

Object Types

Deep-Sky Object Types

TypeDescription
galaxySpiral, elliptical, irregular galaxies
globular_clusterDense spherical star clusters
open_clusterLoose stellar associations
planetary_nebulaShells from dying stars
emission_nebulaGlowing gas clouds
reflection_nebulaDust reflecting starlight
dark_nebulaOpaque dust clouds
supernova_remnantStellar explosion debris
star_cloudDense Milky Way regions

Spectral Classes

ClassColorTemperatureExamples
OBlue>30,000 KVery rare
BBlue-white10,000-30,000 KRigel, Spica
AWhite7,500-10,000 KVega, Sirius
FYellow-white6,000-7,500 KProcyon
GYellow5,200-6,000 KSun
KOrange3,700-5,200 KArcturus
MRed2,400-3,700 KBetelgeuse

Working with Coordinates

All catalog modules provide coordinate functions returning ICRSCoord:

from starward.core.messier import messier_coords
from starward.core.ngc import ngc_coords
from starward.core.hipparcos import star_coords

# Get coordinates
m31_coords = messier_coords(31)
ngc7000_coords = ngc_coords(7000)
sirius_coords = star_coords(32349)

# Use with other calculations
from starward.core.angles import angular_separation

sep = angular_separation(
m31_coords.ra, m31_coords.dec,
sirius_coords.ra, sirius_coords.dec
)
print(f"Separation: {sep.degrees:.1f}°")

Example: Building an Observing List

from starward.core.messier import MESSIER, messier_altitude
from starward.core.observer import Observer
from starward.core.time import jd_now

observer = Observer.from_degrees("Home", 40.7, -74.0)
jd = jd_now()

# Find galaxies above 30° altitude
print("Galaxies visible tonight:")
for obj in MESSIER.filter_by_type("galaxy"):
alt = messier_altitude(obj.number, observer, jd)
if alt.degrees > 30:
print(f" M{obj.number}: {obj.name} ({alt.degrees:.0f}°)")

See Also