# http://pyrocko.org - GPLv3 # # The Pyrocko Developers, 21st Century # ---|P------/S----------~Lg----------
''' 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. '''
''' Check if the constraint completely includes a more restrictive one.
:param constraint: Other constraint. :type constraint: :py:class:`Constraint` '''
elif self.tmin is None: b1 = True else: b1 = False
elif self.tmax is None: b2 = True else: b2 = False
''' Widen constraint to include another given constraint.
:param constraint: Other constraint. :type constraint: :py:class:`Constraint`
Update is done in-place. '''
self.tmin = None else:
self.tmax = None else:
''' 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 (:py:class:`~pyrocko.squirrel.client.fdsn.FDSNSource`) or online event catalogs (:py:class:`~pyrocko.client.catalog.CatalogSource`).
Derived classes implement the details of querying, caching, updating and bookkeeping of the accessed data. '''
''' Let local inventory be up-to-date with remote for a given constraint. '''
''' Let local inventory be up-to-date with remote for a given constraint. '''
''' Let local inventory be up-to-date with remote for a given constraint. '''
pass
'Source', 'Constraint', ] |