lunar_toolkit.stereo
¶
Stereo pair ranking by convergence, illumination similarity and overlap.
TangentPlane(lat, lon, radius_km=MOON_RADIUS_KM)
¶
Gnomonic projection (km) about a centre point; great circles → lines.
ring(ring)
¶
Project a lon/lat ring (deg) to plane (x, y) km (a Projection).
unit_vector(lat, lon)
¶
Unit vector(s) (..., 3) of planetocentric latitude / longitude (deg).
angle_between(a, b)
¶
Angle (deg) between vectors along the last axis (numerically stable).
azimuth_difference(a, b)
¶
Smallest circular difference (deg, 0–180) between azimuths.
convergence_angle(ground, sc1, sc2, centre1=None, centre2=None, radius_km=MOON_RADIUS_KM)
¶
Convergence angle and base/height ratio for two views of one point.
| Parameters: |
|
|---|
| Returns: |
|
|---|
convergence_angles(ground, sc1, sc2, centre1=None, centre2=None, radius_km=MOON_RADIUS_KM)
¶
convergence_angle for arrays: each tuple element is an
array over pairs.
| Returns: |
|
|---|
observation_footprints(df)
¶
Footprint rings, centre unit vectors and angular radii (deg) of observation rows.
Rings are lunar_toolkit.geometry.footprint_rings of each row
(footprint_wkt, else the min_lat…lon_east box), None
(centre 0, radius 0) where a row has no footprint polygon.
aoi_plane(aoi)
¶
Tangent plane about an AOI, the AOI in it (km), and its centre / angular radius.
aoi is anything lunar_toolkit.geometry.load_aoi accepts,
e.g. {"point": (lat, lon), "radius_km": r},
{"lat": (s, n), "lon": (w, e)}, a GeoJSON / WKT path or string.
| Returns: |
|
|---|
find_stereo_pairs(obs_df, aoi=None, convergence=(10.0, 60.0), ideal_convergence=(15.0, 45.0), max_incidence_diff=20.0, max_azimuth_diff=30.0, min_overlap=0.1, min_aoi_coverage=0.0, max_resolution_ratio=None, same_instrument=True, require_geometry=False, min_time_sep_s=60.0, weights=None)
¶
Rank candidate stereo pairs in an observation table.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
score is a weighted mean of terms in [0, 1]:
- convergence — 1 inside ideal_convergence, linear to 0 at the convergence limits (0.5 when the angle is unknown);
- overlap —
aoi_coveragewith an AOI, elseoverlap_frac; - incidence —
1 - incidence_diff / max_incidence_diff; - azimuth —
1 - azimuth_diff / max_azimuth_diff(0.5 if unknown); - resolution — finer / coarser
pixel_scale(0.5 if unknown).
score_pairs(pairs, *, convergence=(10.0, 60.0), ideal_convergence=(15.0, 45.0), max_incidence_diff=20.0, max_azimuth_diff=30.0, weights=None, aoi=False)
¶
The find_stereo_pairs score of pair rows
(convergence, overlap_frac or aoi_coverage with aoi, incidence_diff, azimuth_diff,
resolution_ratio).