Skip to content

lunartrace.sites

Named sites: where they are, the query box around them and their published event bases.

A registered event basis carries the rationale that cites its anchors (for Vikram, see research/studies/vikram/ANCHORS.md). The facade in lunartrace.temporal uses a registered basis when the caller’s interval equals one and says adhoc otherwise.

class

Site

A named lunar site: planetocentric latitude and east-positive longitude in degrees.

def basis_by_id(self, basis_id: str) -> EventBasis | None

The registered basis whose basis_id is basis_id, or None.

def basis_for_interval(self, earliest: str, latest: str) -> EventBasis | None

The registered basis whose inclusive EVENT interval is exactly this one, or None.

function

def get_site(name: str) -> Site

The registered site called name.

  • ValueError — If no site is registered under that name; the message lists the registered names.

function

def find_site(lat: float, lon: float) -> Site | None

The registered site whose centre is exactly (lat, lon) at 4 decimal places.

function

def query_for(
*,
lat: float,
lon: float,
ihid: str,
iid: str,
pt: str,
box: tuple[float, float] = DEFAULT_HALF_BOX_DEG,
) -> ODEQuery

The Lunar ODE query for a box of box degrees half-width around (lat, lon).

Edges are rounded to 4 decimal places. Longitude is taken modulo 360, the planetocentric east-positive convention of ODE.

  • ValueError — If a coordinate is not finite or out of range, the box is not positive, or the box would leave latitude -90..90 or cross the 0/360 longitude seam.