geometry.calc_subpoints

geometry.calc_subpoints(
    object_to_sun,
    object_to_observer,
    body,
    times=None,
    frame='ecliptic',
)

Calculate subpoints and the observer’s rotational local hour angle.

Parameters

object_to_sun : array-like, shape (3,) or (n, 3)

Cartesian vectors from the target body to the Sun and observer.

object_to_observer : array-like, shape (3,) or (n, 3)

Cartesian vectors from the target body to the Sun and observer.

body : Pole or IAUSpin

Pole-only inputs produce latitudes. Complete IAU spin inputs also produce east-positive longitudes wrapped to [0, 360).

times : array-like, default = None

TDB Julian days used to evaluate W(t) for complete IAU spin inputs. The epochs should match the input vectors. In normal skyloc/Kete ephemerides these are already observer-light-time corrected state epochs.

frame : {"ecliptic", "equatorial", "galactic"}, default = 'ecliptic'

Inertial frame of the input vectors. Default is "ecliptic".

Returns

: dict

Subpoint arrays with keys subsol_lat, subobs_lat, and, for complete IAU spin inputs, subsol_lon, subobs_lon, and dhour_obs. All angles are in degrees. dhour_obs lies in [-180, 180) and is wrap180(sign(wdot) * (subobs_lon - subsol_lon)): zero at noon, positive on the afternoon side for a Sun held fixed during rotation. It is NaN for zero rotation or zero transverse Sun/observer projection. Near a pole, its numerical accuracy is limited by the small transverse projection; no angular cutoff is applied.

Notes

Subpoint latitudes are measured from the supplied pole. For a model with negative wdot, a thermal model using the angular-momentum axis as +z also needs the latitude signs reversed. dhour_obs is an instantaneous geometric angle, not a propagated solar-time or thermal-lag estimate.