libera_utils.footprint_matching.geometry.compute_footprint_bounding_boxes#
- libera_utils.footprint_matching.geometry.compute_footprint_bounding_boxes(boresight_lat_deg: ArrayLike, boresight_lon_deg: ArrayLike, subsatellite_lat_deg: ArrayLike, subsatellite_lon_deg: ArrayLike, *, satellite_radius_km: ndarray, fov_halfangle_deg: float = 1.0, n_samples: int = 72) list[BoundingBox | None]#
Compute the lat/lon bounding box of each of
Nradiometer footprints on the surface.Chains: locate each satellite and build the boresight line of sight -> get the PSF angular extent -> rotate each boresight by that extent and ray-trace each ray onto the WGS84 ellipsoid -> assemble a lat/lon box with pole and dateline handling.
Inputs come straight from L1B RAD fields: footprint
Latitude/Longitude,Subsatellite_Latitude/LongitudeandRadius_of_Satellite_from_Center_of_Earth. The last three place the satellite exactly; the line from it to the footprint is the boresight, so the viewing zenith angle and the scan orientation follow from the geometry rather than being inputs.Off-Earth views (a fill, non-finite or out-of-range boresight latitude/longitude) are returned as
Noneat their index rather than raising, so the caller can flag them per footprint. Corner rays that run off the limb at a severe angle are truncated at the horizon and the box’struncatedflag is set. Missing ephemeris fields or a footprint not visible from its satellite raisesMissingGeolocationErrorfor the whole call instead of hiding among theNoneentries.- Parameters:
boresight_lat_deg (array_like) – Per-footprint boresight centroids (L1B
Latitude/Longitude), degrees.boresight_lon_deg (array_like) – Per-footprint boresight centroids (L1B
Latitude/Longitude), degrees.subsatellite_lat_deg (array_like) – Per-footprint geodetic spacecraft sub-points (L1B
Subsatellite_Latitude/Subsatellite_Longitude), degrees.subsatellite_lon_deg (array_like) – Per-footprint geodetic spacecraft sub-points (L1B
Subsatellite_Latitude/Subsatellite_Longitude), degrees.satellite_radius_km (np.ndarray) – 1-D array of each footprint’s spacecraft distance from Earth’s center (L1B
Radius_of_Satellite_from_Center_of_Earth), km, one per footprint.fov_halfangle_deg (float, optional) – Instrument FOV half-angle, degrees. Used as a floor on the PSF extent so the box is never smaller than the optical field of view. Defaults to
libera_utils.footprint_matching.psf.LIBERA_FOV_HALFANGLE_DEG.n_samples (int, optional) – Number of PSF-perimeter samples. Defaults to
_N_PERIMETER_SAMPLES.
- Returns:
One entry per input footprint, in input order.
Nonemarks an off-Earth view.- Return type:
list[BoundingBox | None]
- Raises:
ValueError – If an input is more than 1-D, the inputs do not share a length, or
satellite_radius_kmdoes not hold one radius per footprint.MissingGeolocationError – If any footprint’s subsatellite point or radius is unusable, or any footprint is not visible from its satellite.