squirrel.check

class SquirrelCheckProblemType(...) dummy for 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 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:
  • squirrel (Squirrel) – The Squirrel instance to be checked.

  • tmin (timestamp) – Start time of query interval.

  • tmax (timestamp) – End time of query interval.

  • time (timestamp) – Time instant to query. Equivalent to setting tmin and tmax to the same value.

  • codes (list of CodesNSLCE objects) – Pattern of channel codes to query.

  • ignore (list of str (SquirrelCheckProblemType)) – Problem types to be ignored.

Returns:

SquirrelCheck object containing the results of the check.