pyrocko.io.stationxml¶
FDSN StationXML input, output and data model.
Classes
|
Undocumented. |
|
Any |
|
Instrument azimuth, degrees clockwise from North. |
|
The BaseFilter is derived by all filters. |
|
A base node type for derivation from: Network, Station and Channel types. |
|
Any |
|
Equivalent to SEED blockette 52 and parent element for the related the response blockettes. |
|
Undocumented. |
|
Undocumented. |
|
Response: coefficients for FIR filter. |
|
Container for a comment or log entry. |
|
Undocumented. |
|
Corresponds to SEED blockette 57. |
|
Undocumented. |
|
Instrument dip in degrees down from horizontal. |
|
Extension of FloatWithUnit for distances, elevations, and depths. |
Optional timestamp with support for some common placeholder values. |
|
|
Any |
|
Undocumented. |
|
This type contains a URI and description for external data that users may want to reference in StationXML. |
|
Top-level type for Station XML. |
|
Response: FIR filter. |
|
Undocumented. |
|
Undocumented. |
|
Undocumented. |
|
Complex type for sensitivity and frequency ranges. |
|
Type for latitude coordinate. |
|
Container for log entries. |
|
Type for longitude coordinate. |
|
This type represents the Network layer, all station metadata is contained within this element. |
|
Any |
|
Undocumented. |
|
Undocumented. |
|
Representation of a person's contact information. |
|
Undocumented. |
|
Complex numbers used as poles or zeros in channel response. |
|
Response: complex poles and zeros. |
|
Response: expressed as a polynomial (allows non-linear sensors to be described). |
|
Any |
|
Undocumented. |
|
Response: list of frequency, amplitude and phase values. |
|
Undocumented. |
|
This complex type represents channel response and covers SEED blockettes 53 to 56. |
|
Any |
|
Sample rate in samples per second. |
|
Sample rate expressed as number of samples in a number of seconds. |
|
A time value in seconds. |
|
Sensitivity and frequency ranges. |
|
Description of a site location using name and optional geopolitical boundaries (country, city, etc.). |
|
This type represents a Station epoch. |
|
Any |
|
Any |
|
A type to document units. |
|
Undocumented. |
- class Delivery(payload=None, log=None, errors=None, error=None)[source]¶
Bases:
ObjectUndocumented.
- ♦ payload¶
listofpyrocko.guts.Anyobjects, default:[]
- ♦ log¶
listoftupleof 3strobjects objects, default:[]
- ♦ errors¶
listoftupleof 3strobjects objects, default:[]
- class DummyAwareOptionalTimestamp(...) pyrocko.util.get_time_float[source]¶
Bases:
ObjectOptional timestamp with support for some common placeholder values.
Some StationXML files contain arbitrary placeholder values for open end intervals, like “2100-01-01”. Depending on the time range supported by the system, these dates are translated into
Noneto prevent crashes with this type.
- class Nominal(...) str[source]¶
Bases:
StringChoiceAny
strout of['NOMINAL', 'CALCULATED'].
- class Email(...) str[source]¶
Bases:
UnicodePatternAny
strmatching pattern'[\\w\\.\\-_]+@[\\w\\.\\-_]+'.
- class RestrictedStatus(...) str[source]¶
Bases:
StringChoiceAny
strout of['open', 'closed', 'partial'].
- class Type(...) str[source]¶
Bases:
StringChoiceAny
strout of['TRIGGERED', 'CONTINUOUS', 'HEALTH', 'GEOPHYSICAL', 'WEATHER', 'FLAG', 'SYNTHESIZED', 'INPUT', 'EXPERIMENTAL', 'MAINTENANCE', 'BEAM'].
- class PzTransferFunction(...) str[source]¶
Bases:
StringChoiceAny
strout of['LAPLACE (RADIANS/SECOND)', 'LAPLACE (HERTZ)', 'DIGITAL (Z-TRANSFORM)'].
- class Symmetry(...) str[source]¶
Bases:
StringChoiceAny
strout of['NONE', 'EVEN', 'ODD'].
- class CfTransferFunction(...) str[source]¶
Bases:
StringChoiceAny
strout of['ANALOG (RADIANS/SECOND)', 'ANALOG (HERTZ)', 'DIGITAL'].
- class Approximation(...) str[source]¶
Bases:
StringChoiceAny
strout of['MACLAURIN'].
- class Site(**kwargs)[source]¶
Bases:
ObjectDescription of a site location using name and optional geopolitical boundaries (country, city, etc.).
- ♦ name¶
str, default:''
- ♦ description¶
str, optional
- ♦ town¶
str, optional
- ♦ county¶
str, optional
- ♦ region¶
str, optional
- ♦ country¶
str, optional
- class ExternalReference(**kwargs)[source]¶
Bases:
ObjectThis type contains a URI and description for external data that users may want to reference in StationXML.
- ♦ uri¶
str
- ♦ description¶
str
- class Units(name=None, **kwargs)[source]¶
Bases:
ObjectA type to document units. Corresponds to SEED blockette 34.
- ♦ name¶
str
- ♦ description¶
str, optional
- class SampleRateRatio(**kwargs)[source]¶
Bases:
ObjectSample rate expressed as number of samples in a number of seconds.
- ♦ number_samples¶
int
- ♦ number_seconds¶
int
- class Gain(value=None, **kwargs)[source]¶
Bases:
ObjectComplex type for sensitivity and frequency ranges. This complex type can be used to represent both overall sensitivities and individual stage gains. The FrequencyRangeGroup is an optional construct that defines a pass band in Hertz ( FrequencyStart and FrequencyEnd) in which the SensitivityValue is valid within the number of decibels specified in FrequencyDBVariation.
- ♦ value¶
float, optional
- ♦ frequency¶
float, optional
- class NumeratorCoefficient(**kwargs)[source]¶
Bases:
ObjectUndocumented.
- ♦ i¶
int, optional
- ♦ value¶
float
- class FloatNoUnit(value=None, **kwargs)[source]¶
Bases:
ObjectUndocumented.
- ♦ plus_error¶
float, optional
- ♦ minus_error¶
float, optional
- ♦ value¶
float
- class FloatWithUnit(value=None, **kwargs)[source]¶
Bases:
FloatNoUnitUndocumented.
- ♦ unit¶
str, optional
- class Equipment(**kwargs)[source]¶
Bases:
ObjectUndocumented.
- ♦ resource_id¶
str, optional
- ♦ type¶
str, optional
- ♦ description¶
str, optional
- ♦ manufacturer¶
str, optional
- ♦ vendor¶
str, optional
- ♦ model¶
str, optional
- ♦ serial_number¶
str, optional
- ♦ installation_date¶
pyrocko.util.get_time_float (
DummyAwareOptionalTimestamp), optional
- ♦ removal_date¶
pyrocko.util.get_time_float (
DummyAwareOptionalTimestamp), optional
- ♦ calibration_date_list¶
listof pyrocko.util.get_time_float (pyrocko.guts.Timestamp) objects, default:[]
- class PhoneNumber(**kwargs)[source]¶
Bases:
ObjectUndocumented.
- ♦ description¶
str, optional
- ♦ country_code¶
int, optional
- ♦ area_code¶
int
- ♦ phone_number¶
str(PhoneNumber)
- class BaseFilter(**kwargs)[source]¶
Bases:
ObjectThe BaseFilter is derived by all filters.
- ♦ resource_id¶
str, optional
- ♦ name¶
str, optional
- ♦ description¶
str, optional
- class Sensitivity(value=None, **kwargs)[source]¶
Bases:
GainSensitivity and frequency ranges. The FrequencyRangeGroup is an optional construct that defines a pass band in Hertz (FrequencyStart and FrequencyEnd) in which the SensitivityValue is valid within the number of decibels specified in FrequencyDBVariation.
- ♦ frequency_start¶
float, optional
- ♦ frequency_end¶
float, optional
- ♦ frequency_db_variation¶
float, optional
- class Coefficient(value=None, **kwargs)[source]¶
Bases:
FloatNoUnitUndocumented.
- class PoleZero(**kwargs)[source]¶
Bases:
ObjectComplex numbers used as poles or zeros in channel response.
- ♦ number¶
int, optional
- ♦ real¶
- ♦ imaginary¶
- class ClockDrift(value=None, **kwargs)[source]¶
Bases:
FloatWithUnitUndocumented.
- ♦ unit¶
str, optional, default:'SECONDS/SAMPLE'
- class Second(value=None, **kwargs)[source]¶
Bases:
FloatWithUnitA time value in seconds.
- ♦ unit¶
str, optional, default:'SECONDS'
- class Voltage(value=None, **kwargs)[source]¶
Bases:
FloatWithUnitUndocumented.
- ♦ unit¶
str, optional, default:'VOLTS'
- class Angle(value=None, **kwargs)[source]¶
Bases:
FloatWithUnitUndocumented.
- ♦ unit¶
str, optional, default:'DEGREES'
- class Azimuth(value=None, **kwargs)[source]¶
Bases:
FloatWithUnitInstrument azimuth, degrees clockwise from North.
- ♦ unit¶
str, optional, default:'DEGREES'
- class Dip(value=None, **kwargs)[source]¶
Bases:
FloatWithUnitInstrument dip in degrees down from horizontal. Together azimuth and dip describe the direction of the sensitive axis of the instrument.
- ♦ unit¶
str, optional, default:'DEGREES'
- class Distance(value=None, **kwargs)[source]¶
Bases:
FloatWithUnitExtension of FloatWithUnit for distances, elevations, and depths.
- ♦ unit¶
str, optional, default:'METERS'
- class Frequency(value=None, **kwargs)[source]¶
Bases:
FloatWithUnitUndocumented.
- ♦ unit¶
str, optional, default:'HERTZ'
- class SampleRate(value=None, **kwargs)[source]¶
Bases:
FloatWithUnitSample rate in samples per second.
- ♦ unit¶
str, optional, default:'SAMPLES/S'
- class Person(**kwargs)[source]¶
Bases:
ObjectRepresentation of a person’s contact information. A person can belong to multiple agencies and have multiple email addresses and phone numbers.
- ♦ name_list¶
listofstrobjects, default:[]
- ♦ agency_list¶
listofstrobjects, default:[]
- ♦ phone_list¶
listofPhoneNumberobjects, default:[]
- class FIR(**kwargs)[source]¶
Bases:
BaseFilterResponse: FIR filter. Corresponds to SEED blockette 61. FIR filters are also commonly documented using the Coefficients element.
- ♦ numerator_coefficient_list¶
listofNumeratorCoefficientobjects, default:[]
- class Coefficients(**kwargs)[source]¶
Bases:
BaseFilterResponse: coefficients for FIR filter. Laplace transforms or IIR filters can be expressed using type as well but the PolesAndZeros should be used instead. Corresponds to SEED blockette 54.
- ♦ cf_transfer_function_type¶
str(CfTransferFunction)
- ♦ numerator_list¶
listofFloatWithUnitobjects, default:[]
- ♦ denominator_list¶
listofFloatWithUnitobjects, default:[]
- class Latitude(value=None, **kwargs)[source]¶
Bases:
FloatWithUnitType for latitude coordinate.
- ♦ unit¶
str, optional, default:'DEGREES'
- ♦ datum¶
str, optional, default:'WGS84'
- class Longitude(value=None, **kwargs)[source]¶
Bases:
FloatWithUnitType for longitude coordinate.
- ♦ unit¶
str, optional, default:'DEGREES'
- ♦ datum¶
str, optional, default:'WGS84'
- class PolesZeros(**kwargs)[source]¶
Bases:
BaseFilterResponse: complex poles and zeros. Corresponds to SEED blockette 53.
- ♦ pz_transfer_function_type¶
str(PzTransferFunction)
- ♦ normalization_factor¶
float, default:1.0
- class Polynomial(**kwargs)[source]¶
Bases:
BaseFilterResponse: expressed as a polynomial (allows non-linear sensors to be described). Corresponds to SEED blockette 62. Can be used to describe a stage of acquisition or a complete system.
- ♦ approximation_type¶
str(Approximation), default:'MACLAURIN'
- ♦ approximation_lower_bound¶
float
- ♦ approximation_upper_bound¶
float
- ♦ maximum_error¶
float
- ♦ coefficient_list¶
listofCoefficientobjects, default:[]
- class Decimation(**kwargs)[source]¶
Bases:
ObjectCorresponds to SEED blockette 57.
- ♦ factor¶
int
- ♦ offset¶
int
- ♦ delay¶
- ♦ correction¶
- class Operator(**kwargs)[source]¶
Bases:
ObjectUndocumented.
- ♦ agency_list¶
listofstrobjects, default:[]
- ♦ web_site¶
str, optional
- class Comment(**kwargs)[source]¶
Bases:
ObjectContainer for a comment or log entry. Corresponds to SEED blockettes 31, 51 and 59.
- ♦ value¶
str
- ♦ begin_effective_time¶
pyrocko.util.get_time_float (
DummyAwareOptionalTimestamp), optional
- ♦ end_effective_time¶
pyrocko.util.get_time_float (
DummyAwareOptionalTimestamp), optional
- class ResponseList(**kwargs)[source]¶
Bases:
BaseFilterResponse: list of frequency, amplitude and phase values. Corresponds to SEED blockette 55.
- ♦ response_list_element_list¶
listofResponseListElementobjects, default:[]
- class ResponseStage(**kwargs)[source]¶
Bases:
ObjectThis complex type represents channel response and covers SEED blockettes 53 to 56.
- ♦ resource_id¶
str, optional
- ♦ poles_zeros_list¶
listofPolesZerosobjects, default:[]
- ♦ coefficients_list¶
listofCoefficientsobjects, default:[]
- ♦ response_list¶
ResponseList, optional
- ♦ polynomial¶
Polynomial, optional
- ♦ decimation¶
Decimation, optional
- class Response(**kwargs)[source]¶
Bases:
ObjectUndocumented.
- ♦ resource_id¶
str, optional
- ♦ instrument_sensitivity¶
Sensitivity, optional
- ♦ instrument_polynomial¶
Polynomial, optional
- ♦ stage_list¶
listofResponseStageobjects, default:[]
- classmethod from_pyrocko_pz_response(presponse, input_unit, output_unit, normalization_frequency=1.0)[source]¶
Convert Pyrocko pole-zero response to StationXML response.
- Parameters:
presponse (
PoleZeroResponse) – Pyrocko pole-zero responseinput_unit (str) – Input unit to be reported in the StationXML response.
output_unit (str) – Output unit to be reported in the StationXML response.
normalization_frequency (float) – Frequency where the normalization factor for the StationXML response should be computed.
- class BaseNode(**kwargs)[source]¶
Bases:
ObjectA base node type for derivation from: Network, Station and Channel types.
- ♦ code¶
str
- ♦ start_date¶
pyrocko.util.get_time_float (
DummyAwareOptionalTimestamp), optional
- ♦ end_date¶
pyrocko.util.get_time_float (
DummyAwareOptionalTimestamp), optional
- ♦ restricted_status¶
str(RestrictedStatus), optional
- ♦ alternate_code¶
str, optional
- ♦ historical_code¶
str, optional
- ♦ description¶
str, optional
- class Channel(**kwargs)[source]¶
Bases:
BaseNodeEquivalent to SEED blockette 52 and parent element for the related the response blockettes.
- ♦ location_code¶
str
- ♦ external_reference_list¶
listofExternalReferenceobjects, default:[]
- ♦ sample_rate¶
SampleRate, optional
- ♦ sample_rate_ratio¶
SampleRateRatio, optional
- ♦ storage_format¶
str, optional
- ♦ clock_drift¶
ClockDrift, optional
- class Station(**kwargs)[source]¶
Bases:
BaseNodeThis type represents a Station epoch. It is common to only have a single station epoch with the station’s creation and termination dates as the epoch start and end dates.
- ♦ vault¶
str, optional
- ♦ geology¶
str, optional
- ♦ creation_date¶
pyrocko.util.get_time_float (
DummyAwareOptionalTimestamp), optional
- ♦ termination_date¶
pyrocko.util.get_time_float (
DummyAwareOptionalTimestamp), optional
- ♦ external_reference_list¶
listofExternalReferenceobjects, default:[]
- class Network(**kwargs)[source]¶
Bases:
BaseNodeThis type represents the Network layer, all station metadata is contained within this element. The official name of the network or other descriptive information can be included in the Description element. The Network can contain 0 or more Stations.
- class FDSNStationXML(*args, **kwargs)[source]¶
Bases:
ObjectTop-level type for Station XML. Required field are Source (network ID of the institution sending the message) and one or more Network containers or one or more Station containers.
- ♦ schema_version¶
float, default:1.0
- ♦ source¶
str
- ♦ sender¶
str, optional
- ♦ module¶
str, optional
- ♦ module_uri¶
str, optional
- ♦ created¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp), optional
- classmethod from_pyrocko_stations(pyrocko_stations, add_flat_responses_from=None)[source]¶
Generate
FDSNStationXMLfrom list of :py:class;`pyrocko.model.Station` instances.- Parameters:
pyrocko_stations – list of :py:class;`pyrocko.model.Station` instances.
add_flat_responses_from – unit, ‘M’, ‘M/S’ or ‘M/S**2’