eomatch.enrich.roi_cloud_cover.roi_cloud_cover#
- eomatch.enrich.roi_cloud_cover.roi_cloud_cover(matchup, min_collocation_area_km2: float | None = None, gate: Dict[str, Dict[str, Any]] | None = None, roi: Any | None = None) Dict[str, Any][source]#
Return the percentage of this matchup’s collocation region flagged as cloud.
For a matchup with more than one supported satellite product (a sat2sat case), the maximum across products is used, matching
eomatch.enrich.cloud_cover.cloud_cover()– averaging would let a clear product mask a clouded one.- Parameters:
matchup –
Matchupto enrich.min_collocation_area_km2 – if given, a matchup whose
collocation_regionarea (computed directly from geometry viaeomatch.utils.geometry.collocation_area_km2()– independent of whethereomatch.enrich.geometric.geometric()has already run) is below this returns{}immediately, before resolving or downloading any product.None(the default) applies no gate, preserving existing behaviour. A generalisation of one specific case of gate below; kept as its own parameter for backwards compatibility.gate – generic version of the same idea – see
eomatch.enrich._gate.passes_gate()for exactly which properties can be checked and how a not-yet-known one is handled. Checked in addition to, not instead of,min_collocation_area_km2.roi – Optionally, user can provide roi to use instead of matchup.collocation_region
- Returns:
{"roi_cloud_cover": float}as a percentage in[0, 100], or{}if the matchup is belowmin_collocation_area_km2, failsgate, has no supported satellite product, or no mask pixels fall inside the collocation region.