EphCore.Stars.Catalog (eph_core v0.1.0)

Copy Markdown View Source

Hipparcos star catalog loader and lookup.

Parses stars/hip_main.dat under the configured kernel base directory on first use and caches the result in :persistent_term for fast read-heavy access.

Rows with blank RA, Dec, or Vmag are skipped (incomplete Hipparcos solutions); they are never stored as phantom (0°, 0°) positions.

Summary

Functions

Returns every valid parsed star record (incomplete catalog rows excluded).

Returns star records for all configured significant stars that exist in the catalog.

Looks up a star by Hipparcos number.

Returns the configured HIP → traditional name map for significant stars.

Types

star_record()

@type star_record() :: %{
  hip: integer(),
  name: String.t() | nil,
  ra_deg: float(),
  dec_deg: float(),
  pm_ra_mas_yr: float(),
  pm_dec_mas_yr: float(),
  parallax_mas: float(),
  magnitude: float()
}

Functions

all()

@spec all() :: [star_record()]

Returns every valid parsed star record (incomplete catalog rows excluded).

all_significant()

@spec all_significant() :: [star_record()]

Returns star records for all configured significant stars that exist in the catalog.

lookup(hip)

@spec lookup(integer()) :: {:ok, star_record()} | {:error, :not_found}

Looks up a star by Hipparcos number.

Returns {:ok, star_record} or {:error, :not_found}.

significance_list()

@spec significance_list() :: %{required(integer()) => String.t()}

Returns the configured HIP → traditional name map for significant stars.