pyrocko.squirrel.check

Functionality to check for common data/metadata problems.

Functions

do_check(squirrel[, codes, tmin, tmax, ...])

Check for common data/metadata problems.

Classes

KindChoiceWCR(...)

Any str out of ['waveform', 'channel', 'response'].

SquirrelCheck(**kwargs)

Container for Squirrel check results.

SquirrelCheckEntry(**kwargs)

Squirrel check result for a given channel/response/waveform.

SquirrelCheckProblem(**kwargs)

Diagnostics about a potential problem reported by Squirrel check.

SquirrelCheckProblemType(...)

Potential dataset/metadata problem types.

class SquirrelCheckProblemType(...) str[source]

Bases: StringChoice

Potential dataset/metadata problem types.

Squirrel check problem types

Type

Description

p1

Waveform duplicates.

p2

Overlaps in channel/response epochs.

p3

No waveforms available for a channel/response listed in metadata.

p4

Channel/response information missing for an available waveform.

p5

Multiple channel/response entries matching an available waveform.

p6

Sampling rate of waveform does not match rate listed in metadata.

p7

Waveform incompletely covered by channel/response epochs.

class SquirrelCheckProblem(**kwargs)[source]

Bases: Object

Diagnostics about a potential problem reported by Squirrel check.

type

str (SquirrelCheckProblemType)

Coding indicating the type of problem detected.

symptom

str

Short description of the problem.

details

list of str objects, default: []

Details about the problem.

class KindChoiceWCR(...) str[source]

Bases: StringChoice

Any str out of ['waveform', 'channel', 'response'].

Variables:
  • choices – Allowed choices (list of str).

  • ignore_case – Whether to behave case-insensitive (bool, default: False).

class SquirrelCheckEntry(**kwargs)[source]

Bases: Object

Squirrel check result for a given channel/response/waveform.

codes

pyrocko.squirrel.model.CodesNSLCE

Codes denominating a seismic channel.

available

list of str (KindChoiceWCR) objects, default: []

Available content kinds.

problems

list of SquirrelCheckProblem objects, default: []

Potential problems detected.

class SquirrelCheck(**kwargs)[source]

Bases: Object

Container for Squirrel check results.

entries

list of SquirrelCheckEntry objects, default: []

get_nproblems()[source]

Total number of problems detected.

Return type:

int

get_summary()[source]

Textual summary of check result.

Return type:

str

get_text(verbosity=0)[source]

Textual representation of check result.

Parameters:

verbosity (int) – Set verbosity level.

Return type:

str

do_check(squirrel, codes=None, tmin=None, tmax=None, time=None, ignore=[])[source]

Check for common data/metadata problems.

Parameters:
Returns:

SquirrelCheck object containing the results of the check.