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
Sat2SatMUFinderand 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.pathin the config when provided. Ignored if catalogue is given.catalogue – an already-open
MatchupCatalogueto add this run’s events to, instead of constructing (and reopening from disk) a new one from path/context. Useful for a caller that runsfind_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 withsave=Falseto 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
Falseand callsave()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 isTrue.