eomatch.mu_stac.MatchupCatalogue.get_events

eomatch.mu_stac.MatchupCatalogue.get_events#

MatchupCatalogue.get_events(collections: List[str] | None = None, platforms: List[str] | None = None, start_time: datetime | None = None, stop_time: datetime | None = None, bbox: List[float] | None = None, products_downloaded: bool = False, properties: Dict[str, Any] | None = None) MatchupEventSet[source]#

Return MatchupEvents from the catalogue, each with its MatchupSet populated.

Filtering is applied directly against the STAC Item properties before any Python objects are reconstructed, so events that do not match are skipped cheaply.

The properties filter operates on matchup items (not event items). Each key maps to a bare value (equality) or a dict of operator → threshold pairs. Supported operators: lt, lte, gt, gte, eq, ne, in. Matchups that do not satisfy all conditions are excluded; events with no remaining matchups are dropped entirely. Properties must have been added to the items first via eomatch.enrich.enrich().

Example:

events = cat.get_events(
    properties={
        "time_diff_s": {"lt": 900},
        "land_fraction": {"lt": 0.2},
    }
)
Parameters:
  • collections – restrict to one sensor pair, e.g. ["LANDSAT_C2L1", "S3_EFR"].

  • platforms – return only events that include at least one of these platforms.

  • start_time – return only events whose stop time is at or after this datetime.

  • stop_time – return only events whose start time is at or before this datetime.

  • bbox – spatial overlap filter as [lon_min, lat_min, lon_max, lat_max].

  • products_downloaded – if True, only include matchups whose every source product has been downloaded (scrappi:asset_state: downloaded on its data asset). Events with no qualifying matchups are omitted entirely.

  • properties – property filter applied to each matchup STAC Item. Only matchups whose items satisfy all conditions are included.

Returns:

MatchupEventSet with matchup_set populated where matchups exist.