Planets package

ephemeris_tools.planets

Planet-specific configurations (moons, rings, orbital elements).

class ArcSpec(ring_index: int, minlon_deg: float, maxlon_deg: float, name: str = '', motion_deg_day: float = 0.0)[source]

Bases: object

Neptune arc: ring index and longitude range (degrees).

maxlon_deg: float
minlon_deg: float
motion_deg_day: float = 0.0
name: str = ''
ring_index: int
class MoonSpec(id: int, name: str, label: str, is_irregular: bool = False)[source]

Bases: object

Moon identifier and display options.

id: int
is_irregular: bool = False
label: str
name: str
class PlanetConfig(planet_id: int, planet_num: int, equatorial_radius_km: float, planet_name: str, starlist_file: str, longitude_direction: str, moons: list[MoonSpec] = <factory>, rings: list[RingSpec] = <factory>, arcs: list[ArcSpec] = <factory>, barycenter_id: int | None = None, barycenter_offset_km: float = 0.0, f_ring_index: int | None = None, ring_offsets_km: dict[int, float]=<factory>)[source]

Bases: object

Base planet configuration: IDs, radius, moons, rings, longitude direction.

arcs: list[ArcSpec]
barycenter_id: int | None = None
barycenter_offset_km: float = 0.0
equatorial_radius_km: float
f_ring_index: int | None = None
longitude_direction: str
moon_by_id(body_id: int) MoonSpec | None[source]

Return MoonSpec for given NAIF body ID.

Parameters:

body_id – SPICE body ID.

Returns:

MoonSpec or None if not found.

moon_ids() list[int][source]

Ordered list of moon NAIF body IDs (excluding planet center).

Returns:

List of moon IDs in config order.

moons: list[MoonSpec]
planet_id: int
planet_name: str
planet_num: int
ring_offsets_km: dict[int, float]
rings: list[RingSpec]
starlist_file: str
class RingSpec(outer_km: float, inner_km: float = 0.0, elev_km: float = 0.0, ecc: float = 0.0, inc_rad: float = 0.0, peri_rad: float = 0.0, node_rad: float = 0.0, opaque: bool = False, opaque_unlit: bool | None = None, dashed: bool = False, grayscale: float = 1.0, dperi_dt: float = 0.0, dnode_dt: float = 0.0, name: str | None = None)[source]

Bases: object

Ring geometry and display (one radius = outer; inner from previous or 0).

dashed: bool = False
dnode_dt: float = 0.0
dperi_dt: float = 0.0
ecc: float = 0.0
elev_km: float = 0.0
grayscale: float = 1.0
inc_rad: float = 0.0
inner_km: float = 0.0
name: str | None = None
node_rad: float = 0.0
opaque: bool = False
opaque_unlit: bool | None = None
outer_km: float
peri_rad: float = 0.0
get_moon_display_name(planet_num: int, moon_id: int) str | None[source]

Return display name for moon (e.g. ‘Ganymede (J3)’).

Parameters:
  • planet_num – Planet number (4-9).

  • moon_id – NAIF moon body ID (e.g. 503 for Ganymede).

Returns:

Display string (name + letter index) or None if unknown.

Raises:

None. Invalid planet_num or moon_id yields None; no exceptions are raised.

get_moon_name_to_index(planet_num: int) dict[str, int][source]

Return mapping of lowercase moon name to list index for the planet.

Parameters:

planet_num – Planet number (4-9).

Returns:

Dict mapping moon name (lowercase) to index in moons list (planet center excluded from count).

parse_moon_spec(planet_num: int, tokens: list[str]) list[int][source]

Convert moon tokens to NAIF moon IDs (CLI/CGI moon selection).

Parameters:
  • planet_num – Planet number (4-9).

  • tokens – List of 1-based indices, NAIF IDs, or case-insensitive names.

Returns:

List of NAIF moon IDs. Supports classical and all group keywords. Unknown names are skipped (logged).

ephemeris_tools.planets.base

Base planet configuration dataclass for viewer/ephemeris/tracker.

class ArcSpec(ring_index: int, minlon_deg: float, maxlon_deg: float, name: str = '', motion_deg_day: float = 0.0)[source]

Bases: object

Neptune arc: ring index and longitude range (degrees).

maxlon_deg: float
minlon_deg: float
motion_deg_day: float = 0.0
name: str = ''
ring_index: int
class MoonSpec(id: int, name: str, label: str, is_irregular: bool = False)[source]

Bases: object

Moon identifier and display options.

id: int
is_irregular: bool = False
label: str
name: str
class PlanetConfig(planet_id: int, planet_num: int, equatorial_radius_km: float, planet_name: str, starlist_file: str, longitude_direction: str, moons: list[MoonSpec] = <factory>, rings: list[RingSpec] = <factory>, arcs: list[ArcSpec] = <factory>, barycenter_id: int | None = None, barycenter_offset_km: float = 0.0, f_ring_index: int | None = None, ring_offsets_km: dict[int, float]=<factory>)[source]

Bases: object

Base planet configuration: IDs, radius, moons, rings, longitude direction.

arcs: list[ArcSpec]
barycenter_id: int | None = None
barycenter_offset_km: float = 0.0
equatorial_radius_km: float
f_ring_index: int | None = None
longitude_direction: str
moon_by_id(body_id: int) MoonSpec | None[source]

Return MoonSpec for given NAIF body ID.

Parameters:

body_id – SPICE body ID.

Returns:

MoonSpec or None if not found.

moon_ids() list[int][source]

Ordered list of moon NAIF body IDs (excluding planet center).

Returns:

List of moon IDs in config order.

moons: list[MoonSpec]
planet_id: int
planet_name: str
planet_num: int
ring_offsets_km: dict[int, float]
rings: list[RingSpec]
starlist_file: str
class RingSpec(outer_km: float, inner_km: float = 0.0, elev_km: float = 0.0, ecc: float = 0.0, inc_rad: float = 0.0, peri_rad: float = 0.0, node_rad: float = 0.0, opaque: bool = False, opaque_unlit: bool | None = None, dashed: bool = False, grayscale: float = 1.0, dperi_dt: float = 0.0, dnode_dt: float = 0.0, name: str | None = None)[source]

Bases: object

Ring geometry and display (one radius = outer; inner from previous or 0).

dashed: bool = False
dnode_dt: float = 0.0
dperi_dt: float = 0.0
ecc: float = 0.0
elev_km: float = 0.0
grayscale: float = 1.0
inc_rad: float = 0.0
inner_km: float = 0.0
name: str | None = None
node_rad: float = 0.0
opaque: bool = False
opaque_unlit: bool | None = None
outer_km: float
peri_rad: float = 0.0

ephemeris_tools.planets.mars

Mars planet configuration (viewer3_mar.f).

ephemeris_tools.planets.jupiter

Jupiter planet configuration (viewer3_jup.f).

ephemeris_tools.planets.saturn

Saturn planet configuration (viewer3_sat.f).

ephemeris_tools.planets.uranus

Uranus planet configuration (viewer3_ura.f).

ephemeris_tools.planets.neptune

Neptune planet configuration (viewer3_nep.f).

ephemeris_tools.planets.pluto

Pluto planet configuration (viewer3_plu.f).