pyrocko.squirrel.client.catalog

Squirrel online earthquake catalog client.

Classes

CatalogSource(catalog[, query_args])

Squirrel data-source to transparently access online earthquake catalogs.

class CatalogSource(catalog, query_args=None, **kwargs)[source]

Bases: Source

Squirrel data-source to transparently access online earthquake catalogs.

The catalog source maintains and synchronizes a partial copy of the online catalog, e.g. of all events above a certain magnitude. The time span for which the local copy of the catalog should be up-to date is maintained automatically be Squirrel. Data is loaded and updated in chunks as needed in a just-in-time fashion. Data validity can optionally expire after a given period of time and new data can be treated to be preliminary. In both cases information will be refreshed as needed.

catalog

str

Catalog name.

query_args

dict of str objects, optional

Common arguments, which are appended to all queries, e.g. to constrain location, depth or magnitude ranges.

expires

float (pyrocko.guts.Duration), optional

Expiration time [s]. Information older than this will be refreshed, i.e. queried again.

anxious

float (pyrocko.guts.Duration), optional

Anxiety period [s]. Information will be treated as preliminary if it was younger than this at the time of its retrieval. Preliminary information is refreshed on each query relevant to it.

cache_path

str, optional

Directory path where the partial local copy of the catalog is kept. By default the Squirrel environment’s cache directory is used.