pyrocko.squirrel.client.local

Data-source definition providing access local data.

Classes

ContentKind(...)

Choice of Squirrel content kind, e.g. 'waveform', 'station', 'channel', 'response' or 'event'.

FileFormat(...)

Choice of file format, one of the formats supported by pyrocko.squirrel.io, or 'detect' for auto-detection.

LocalData(*args, **kwargs)

A collection of local files attachable as a Squirrel data-source.

class FileFormat(...) → str[source]

Bases: StringChoice

Choice of file format, one of the formats supported by pyrocko.squirrel.io, or 'detect' for auto-detection.

class ContentKind(...) → str[source]

Bases: StringChoice

Choice of Squirrel content kind, e.g. 'waveform', 'station', 'channel', 'response' or 'event'.

class LocalData(*args, **kwargs)[source]

Bases: Source

A collection of local files attachable as a Squirrel data-source.

♦ paths

list of str (pyrocko.has_paths.Path) objects, default: []

Directory and file paths to add to the Squirrel instance. See Squirrel.add().

♦ kinds

list of str (ContentKind) objects, optional

Content kinds to be added to the Squirrel selection. By default all known content kinds are added.

♦ include

str, optional

If not None, files are only included if their paths match the given regular expression pattern.

♦ exclude

str, optional

If not None, files are only included if their paths do not match the given regular expression pattern.

♦ format

str (FileFormat), default: 'detect'

Assume files are of given format.

describe()[source]

Get short identifying description of the source.

Return type:

str

setup(squirrel, check=True, upgrade=False)[source]

Add the local files to the squirrel.

See setup() for the parameters (upgrade is accepted but unused).