squirrel.client
¶
-
class
Constraint
(**kwargs)[source]¶ Bases:
pyrocko.guts.Object
Used by some data-sources to grow or join locally mirrored data selections.
Squirrel data-sources typically try to mirror only a subset of the remotely available data. This subset may need to be grown or updated when data from other time intervals or from locations outside the initially requested region is requested. This class helps in the involved bookeeping.
The current implementation only supports a time interval selection with a single time span but more sophisticated constraints, including e.g. location boxes could be thought of.
-
♦
tmin
¶ builtins.float
(pyrocko.guts.Timestamp
), optional
-
♦
tmax
¶ builtins.float
(pyrocko.guts.Timestamp
), optional
-
contains
(constraint)[source]¶ Check if the constraint completely includes a more restrictive one.
Parameters: constraint ( Constraint
) – Other constraint.
-
expand
(constraint)[source]¶ Widen constraint to include another given constraint.
Parameters: constraint ( Constraint
) – Other constraint.Update is done in-place.
-
♦
-
class
Source
(**kwargs)[source]¶ Bases:
pyrocko.guts.Object
Base class for Squirrel data-sources.
Data-sources can be attached to a Squirrel instance to allow transparent access to remote (or otherwise generated) resources, e.g. through FDSN web services (
FDSNSource
) or online event catalogs (CatalogSource
).Derived classes implement the details of querying, caching, updating and bookkeeping of the accessed data.
-
update_channel_inventory
(squirrel, constraint)[source]¶ Let local inventory be up-to-date with remote for a given constraint.
-
-
class
FileFormat
(dummy) → str[source]¶ Bases:
pyrocko.guts.StringChoice
Any
str
out of['detect', 'datacube', 'mseed', 'pyrocko_events', 'pyrocko_stations', 'sac', 'stationxml', 'tdms_idas', 'virtual', 'yaml']
.
-
class
ContentKind
(dummy) → str[source]¶ Bases:
pyrocko.guts.StringChoice
Any
str
out of['waveform', 'station', 'channel', 'response', 'event']
.
-
class
LocalData
(*args, **kwargs)[source]¶ Bases:
pyrocko.squirrel.client.base.Source
,pyrocko.has_paths.HasPaths
A collection of local files attachable as a Squirrel data-source.
-
♦
paths
¶ list
ofbuiltins.str
(pyrocko.has_paths.Path
) objects, default:[]
Directory and file paths to add to the Squirrel instance. See
Squirrel.add()
.
-
♦
kinds
¶ list
ofbuiltins.str
(ContentKind
) objects, optionalContent kinds to be added to the Squirrel selection. By default all known content kinds are added.
-
♦
format
¶ builtins.str
(FileFormat
), default:'detect'
Assume files are of given format.
-
♦