pyrocko.squirrel.dataset

Portable dataset description.

The Dataset class defines sets of local and remote data-sources to be used in combination in Squirrel-based programs. By convention, Squirrel-based programs accept the --dataset option to read such dataset descriptions from file. To add a dataset programmatically, to a Squirrel instance, use add_dataset().

Functions

get_builtin_datasets()

Get the dict of built-in, ready-to-use example datasets, keyed by their ':<name>' dataset id (see read_dataset()), building it on first call.

make_builtin_datasets()

Build the dict of built-in, ready-to-use example datasets, keyed by their ':<name>' dataset id (see read_dataset()).

read_dataset(path)

Read dataset description file.

Classes

Dataset(*args, **kwargs)

Dataset description.

PersistentID(...)

Pattern to validate persistent selection names (see Selection).

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

Bases: StringPattern

Pattern to validate persistent selection names (see Selection).

make_builtin_datasets()[source]

Build the dict of built-in, ready-to-use example datasets, keyed by their ':<name>' dataset id (see read_dataset()).

get_builtin_datasets()[source]

Get the dict of built-in, ready-to-use example datasets, keyed by their ':<name>' dataset id (see read_dataset()), building it on first call.

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

Bases: HasPaths

Dataset description.

♦ sources

list of pyrocko.squirrel.client.base.Source objects, default: []

Local and remote data sources to be added to the squirrel.

♦ comment

str, optional

Description of the dataset, for display purposes.

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

Add the dataset’s sources to a squirrel instance.

Parameters:
  • squirrel (Squirrel) – Squirrel instance to be configured.

  • check (bool) – If True, check file modification times of already indexed local files (slow). If False, use Squirrel’s fast --optimistic mode instead.

  • upgrade (bool) – If True, automatically migrate any FDSN waveform archives found using an outdated on-disk storage layout.

read_dataset(path)[source]

Read dataset description file.