pyrocko.squirrel.model¶
Data model and content types handled by the Squirrel framework.
Squirrel uses flat content types to represent waveform, station, channel,
response, event, and a few other objects. A common subset of the information in
these objects is indexed in the database, currently: kind, codes, time interval
and sampling rate. The Nut objects encapsulate this information
together with information about where and how to get the associated bulk data.
Further content types are defined here to handle waveform orders, waveform promises, data coverage and sensor information.
Classes
|
A channel of a seismic station. |
|
Undocumented. |
|
Undocumented. |
|
Codes denominating a seismic station (NSL). |
|
|
|
Codes denominating a seismic channel (NSLC or NSLCE). |
|
|
|
General purpose codes for anything other than channels or stations. |
|
|
|
Information about times covered by a waveform or other time series data. |
|
A seismic event. |
|
Index entry referencing an elementary piece of content. |
|
Choice of observational or technical quantity. |
|
The instrument response of a seismic station channel. |
|
Representation of a response stage. |
|
Representation of a channel group. |
|
A seismic station. |
|
Waveform request information. |
|
Information about a waveform potentially downloadable from a remote site. |
- class CodesNSLCEBase(network, station, location, channel, extra)¶
Bases:
tuple- channel¶
Alias for field number 3
- extra¶
Alias for field number 4
- location¶
Alias for field number 2
- network¶
Alias for field number 0
- station¶
Alias for field number 1
- class CodesNSLCE(*args, safe_str=None, **kwargs)[source]¶
Bases:
CodesNSLCEBase,CodesCodes denominating a seismic channel (NSLC or NSLCE).
FDSN/SEED style NET.STA.LOC.CHA is accepted or NET.STA.LOC.CHA.EXTRA, where the EXTRA part in the latter form can be used to identify a custom processing applied to a channel.
- as_dict()¶
Return a new dict which maps field names to their values.
- class CodesNSLBase(network, station, location)¶
Bases:
tuple- location¶
Alias for field number 2
- network¶
Alias for field number 0
- station¶
Alias for field number 1
- class CodesNSL(*args, safe_str=None, **kwargs)[source]¶
Bases:
CodesNSLBase,CodesCodes denominating a seismic station (NSL).
NET.STA.LOC is accepted, slightly different from SEED/StationXML, where LOC is part of the channel. By setting location=’*’ is possible to get compatible behaviour in most cases.
- as_dict()¶
Return a new dict which maps field names to their values.
- class CodesX(name='', safe_str=None)[source]¶
Bases:
CodesXBase,CodesGeneral purpose codes for anything other than channels or stations.
- as_dict()¶
Return a new dict which maps field names to their values.
- class Station(**kwargs)[source]¶
Bases:
LocationA seismic station.
- ♦ tmin¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp), optional
- ♦ tmax¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp), optional
- ♦ description¶
str, optional
- class ChannelBase(**kwargs)[source]¶
Bases:
LocationUndocumented.
- ♦ codes¶
- ♦ tmin¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp), optional
- ♦ tmax¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp), optional
- ♦ deltat¶
float, optional
- class Channel(**kwargs)[source]¶
Bases:
ChannelBaseA channel of a seismic station.
- ♦ dip¶
float, optional
- ♦ azimuth¶
float, optional
- class Sensor(**kwargs)[source]¶
Bases:
ChannelBaseRepresentation of a channel group.
- class QuantityType(...) str[source]¶
Bases:
StringChoiceChoice of observational or technical quantity.
SI units are used for all quantities, where applicable.
- class ResponseStage(**kwargs)[source]¶
Bases:
ObjectRepresentation of a response stage.
Components of a seismic recording system are represented as a sequence of response stages, e.g. sensor, pre-amplifier, digitizer, digital downsampling.
- ♦ input_quantity¶
str(QuantityType), optional
- ♦ input_sample_rate¶
float, optional
- ♦ output_quantity¶
str(QuantityType), optional
- ♦ output_sample_rate¶
float, optional
- ♦ elements¶
listofpyrocko.response.FrequencyResponseobjects, default:[]
- ♦ log¶
listoftupleof 3strobjects objects, default:[]
- class Response(**kwargs)[source]¶
Bases:
ObjectThe instrument response of a seismic station channel.
- ♦ codes¶
- ♦ tmin¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp), optional
- ♦ tmax¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp), optional
- ♦ stages¶
listofResponseStageobjects, default:[]
- ♦ checkpoints¶
listofpyrocko.response.FrequencyResponseCheckpointobjects, default:[]
- ♦ deltat¶
float, optional
- ♦ log¶
listoftupleof 3strobjects objects, default:[]
- class Event(**kwargs)[source]¶
Bases:
ObjectA seismic event.
- ♦ name¶
str, optional
- ♦ time¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp)
- ♦ duration¶
float, optional
- ♦ lat¶
float
- ♦ lon¶
float
- ♦ depth¶
float, optional
- ♦ magnitude¶
float, optional
- class WaveformPromise(**kwargs)[source]¶
Bases:
ObjectInformation about a waveform potentially downloadable from a remote site.
In the Squirrel framework, waveform promises are used to permit download of selected waveforms from a remote site. They are typically generated by calls to
update_waveform_promises(). Waveform promises are inserted and indexed in the database similar to normal waveforms. When processing a waveform query, e.g. fromget_waveforms(), and no local waveform is available for the queried time span, a matching promise can be resolved, i.e. an attempt is made to download the waveform from the remote site. The promise is removed after the download attempt (except when a network error occurs). This prevents Squirrel from making unnecessary queries for waveforms missing at the remote site.- ♦ codes¶
- ♦ tmin¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp)
- ♦ tmax¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp)
- ♦ deltat¶
float, optional
- ♦ source_hash¶
str
- class WaveformOrder(**kwargs)[source]¶
Bases:
ObjectWaveform request information.
- ♦ source_id¶
str
- ♦ codes¶
- ♦ deltat¶
float
- ♦ tmin¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp)
- ♦ tmax¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp)
- ♦ gaps¶
listoftupleof 2 pyrocko.util.get_time_float (pyrocko.guts.Timestamp) objects objects, default:[]
- ♦ time_created¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp)
- ♦ anxious¶
float(pyrocko.guts.Duration), default:600.0
- class Nut(file_path=None, file_format=None, file_mtime=None, file_size=None, file_segment=None, file_element=None, kind_id=0, codes=CodesX(name=''), tmin_seconds=None, tmin_offset=0, tmax_seconds=None, tmax_offset=0, deltat=None, content=None, raw_content=None, tmin=None, tmax=None, values_nocheck=None)[source]¶
Bases:
ObjectIndex entry referencing an elementary piece of content.
So-called nuts are used in Pyrocko’s Squirrel framework to hold common meta-information about individual pieces of waveforms, stations, channels, etc. together with the information where it was found or generated.
- ♦ file_path¶
str, optional
- ♦ file_format¶
str, optional
- ♦ file_mtime¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp), optional
- ♦ file_size¶
int, optional
- ♦ file_segment¶
int, optional
- ♦ file_element¶
int, optional
- ♦ kind_id¶
int
- ♦ tmin_seconds¶
int, default:0
- ♦ tmin_offset¶
int, optional, default:0
- ♦ tmax_seconds¶
int, default:0
- ♦ tmax_offset¶
int, optional, default:0
- ♦ deltat¶
float, default:0.0
- ♦ content¶
pyrocko.guts.Any, optional
- ♦ raw_content¶
dictofpyrocko.guts.Anyobjects, default:{}
- class Coverage(**kwargs)[source]¶
Bases:
ObjectInformation about times covered by a waveform or other time series data.
- ♦ kind_id¶
intContent type.
- ♦ deltat¶
float, optionalSampling interval [s]
- ♦ tmin¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp), optionalGlobal start time of time series.
- ♦ tmax¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp), optionalGlobal end time of time series.
- ♦ changes¶
listoftupleof 2pyrocko.guts.Anyobjects objects, default:[]List of change points, with entries of the form
(time, count), where acountof zero indicates start of a gap, a value of 1 start of normal data coverage and a higher value duplicate or redundant data coverage.