eomatch.find_and_catalogue.find_and_catalogue

eomatch.find_and_catalogue.find_and_catalogue#

eomatch.find_and_catalogue.find_and_catalogue(context: EOMatchContext | None = None, path: str | None = None, catalogue: MatchupCatalogue | None = None, save: bool = True) → MatchupCatalogue[source]#

Run Sat2SatMUFinder and persist all found events and matchups to a STAC catalogue.

Both the finder and the catalogue read from the same context, so a single config covers the orbitx parameters (platforms, time range, thresholds) and the catalogue parameters (path, id, description).

Parameters:
  • context – shared configuration; defaults to EOMatchContext().

  • path – root directory to save the catalogue. Overrides matchup_catalogue.path in the config when provided. Ignored if catalogue is given.

  • catalogue – an already-open MatchupCatalogue to add this run’s events to, instead of constructing (and reopening from disk) a new one from path/context. Useful for a caller that runs find_and_catalogue() many times in a loop (e.g. once per region and/or time window) against one shared, growing catalogue – reusing the same in-memory instance avoids re-reading the whole catalogue from disk on every call. Combine with save=False to also defer writing it back out until the caller’s loop finishes.

  • save – whether to write the catalogue to disk before returning. A caller reusing catalogue across many calls can pass False and call save() itself once at the end, instead of paying for a full save (which rewrites every item in the catalogue, not just what changed this call) on every call.

Returns:

the populated MatchupCatalogue.

Raises:

ValueError – if no catalogue path is set via path/catalogue or the config, and save is True.