obsinfo.instrumentation package
obsinfo.instrumentation.instrumentation module
Instrumentation class
- class obsinfo.instrumentation.instrumentation.Instrumentation(attributes_dict, station_locations, station_location_code, station_start_date, station_end_date)
Bases:
object
One or more Instrument Channels. Part of an obspy/StationXML Station
Methods convert info files to an instance of this class. No equivalent obspy/StationXML class
A more detailed description the class and its attributes is found in XXX
- equipment
- Type
Equipment
- channels
list of channels (
Channel
)- Type
list
- __init__(attributes_dict, station_locations, station_location_code, station_start_date, station_end_date)
Constructor
attributes_dict may contain a configuration_selection for the instrumentation and the corresponding configs for the components: datalogger, preamplifier and sensor
- Parameters
attributes_dict (dict or
ObsMetadata
) – instrumentation attributesstation_locations (
Locations
) – list of Locationsstation_location_code (str) – station’s location code
station_start_date (str) – station start date
station_end_date (str) – station end date
It is assumed an instrumentation’s default location, start date and end_date are the same as its station’s.
- class obsinfo.instrumentation.instrumentation.Instrumentations(instrumentations_list)
Bases:
obsinfo.helpers.obsinfo_class_list.ObsinfoClassList
A list of Instrumentation objects
- __init__(instrumentations_list)
- Parameters
instrumentations_list – (list of
Instrumentations
):
obsinfo.instrumentation.channel module
Channel, Instrument and Operator classes
- class obsinfo.instrumentation.channel.Channel(attributes_dict, ic_modifs: dict, location, equipment)
Bases:
object
Corresponds to StationXML/obspy Channel plus channel code
- das_channel
represents a channel with defaults incorporated
- Type
ObsMetadata
- location
location for this channel
- Type
Location
- start_date
inherited from Station
- Type
str
- end_date
inherited from Station
- Type
str
- instrument
a sensor, a datalogger and an optional preamplifier
- Type
Instrument
- orientation
- Type
Orientation
- comments
- Type
list of str
- __init__(attributes_dict, ic_modifs: dict, location, equipment)
Constructor
- Parameters
attributes_dict (dict or
ObsMetadata
) – channel attributesic_modifs (dict or
ObsMetadata
) – modifications to pass through to InstrumentComponentslocation (
Location
) – channel locationequipment (
Equipment
) – channel equipment
- channel_code(sample_rate)
Return channel code for a given sample rate.
Validates instrument and orientation codes according to FDSN specifications (for instruments, just the length). Channel codes specified by user are indicative and are refined using actual sample rate.
- Parameters
sample_rate (float) – instrumentation sampling rate (sps)
- property seed_code
This is equivalent to channel code for self.instrument.sample_rate
- to_obspy()
Create obspy Channel object
- Returns
obspy.core.inventory.channel.Channel)
- Return type
(~class
obsinfo.instrumentation.instrument_component module
InstrumentComponent class and subclasses Sensor, Preamplifier, Datalogger. Equipment class
- class obsinfo.instrumentation.instrument_component.Datalogger(attributes_dict, higher_modifs={})
Bases:
obsinfo.instrumentation.instrument_component.InstrumentComponent
Datalogger Instrument Component.
Obspy ``Datalogger` only contains elements of
Equipment
, rest is in Response- equipment
equipment attributes
- Type
Equipment
- stages
channel modifications inherited from station
- Type
Stages
- sample_rate
sample rate of given configuration. Checked against actual sample rate
- Type
float
- correction
the delay correction of the component. If a float, it is applied to the last stage and the other stage corrections are set to 0. If None, each stage’s correction is set equal to its delay
- Type
float or None
- __init__(attributes_dict, higher_modifs={})
- Parameters
attributes_dict (dict or
ObsMetadata
) – InstrumentComponent attributeshigher_modifs (dict or
ObsMetadata
) – modifications inherited from instrumentation
- Returns
- class obsinfo.instrumentation.instrument_component.InstrumentComponent(attributes_dict, higher_modifs={})
Bases:
object
InstrumentComponent class. Superclass of all component classes. No obspy/StationXML equivalent, because they only specify the whole sensor+amplifier+datalogger system
- equipment
- Type
Equipment
- stages
- Type
Stages
- obspy_equipment
- Type
obspy_Equipment
- configuration_description
description of configuration to be added to equipment description
- Type
str
- __init__(attributes_dict, higher_modifs={})
Creator.
- Parameters
attributes_dict (dict or
ObsMetadata
) – InstrumentComponent attributeshigher_modifs (dict or
ObsMetadata
) – modifications inherited from instrumentation
- class obsinfo.instrumentation.instrument_component.Preamplifier(attributes_dict, higher_modifs={})
Bases:
obsinfo.instrumentation.instrument_component.InstrumentComponent
Preamplifier Instrument Component. No obspy equivalent
- Attributes:
equipment (
Equipment
): Equipment information stages (Stages
): channel modifications inherited from station configuration_description (str): the configuration description that wasselected, added to equipment description
- __init__(attributes_dict, higher_modifs={})
- Parameters
attributes_dict (dict or
ObsMetadata
) – InstrumentComponent attributeshigher_modifs (dict or
ObsMetadata
) – modifications inherited from instrumentation
- class obsinfo.instrumentation.instrument_component.Sensor(attributes_dict, higher_modifs={})
Bases:
obsinfo.instrumentation.instrument_component.InstrumentComponent
Sensor Instrument Component. No obspy equivalent
- seed_band_base_code
SEED base code (“B” or “S”) indicating instrument band. Must be modified by obsinfo to correspond to output sample rate. Actual SEED base code is determined by FDSN standard <http://docs.fdsn.org/ projects/source-identifiers/en/v1.0/channel-codes.html>`
- Type
str (len 1)
- seed_instrument code
SEED instrument code, determined by FDSN standard <http://docs.fdsn.org/projects/source- identifiers/en/v1.0/channel-codes.html>
- Type
str (len 1)
- stages
channel modifications inherited from station
- Type
Stages
- __init__(attributes_dict, higher_modifs={})
Create Sensor instance from an attributes_dict
- Parameters
attributes_dict (dict or
ObsMetadata
) – InstrumentComponent attributeshigher_modifs (dict or
ObsMetadata
) – modifications inherited from instrumentation
obsinfo.instrumentation.response_stages module
Stages and Stage classes
- class obsinfo.instrumentation.stages.Stages(attribute_list=None, higher_modifications={}, correction=None)
Bases:
obsinfo.helpers.obsinfo_class_list.ObsinfoClassList
Ordered list of
Stage
.Has a custom constructor using a list of attribute_dicts, and custom input_units(), output_units and to_obspy() methods
- stages
- Type
list of objects of
Stage
- __init__(attribute_list=None, higher_modifications={}, correction=None)
Constructor
- Parameters
attribute_list (list of dicts) – information file dictionaries for each stage
higher_modifications (dict or
ObsMetadata
) – modifications to pass down to Stagecorrection (float) – used only for datalogger: the delay correction for the entire instrument
- property calibration_dates
- property input_units
- property output_units
obsinfo.instrumentation.filter module
Filter classes: - Coefficients - FIR - PolesZeros - ResponseList - Polynomial (never tested) - ADConversion (subclass of PolesZeros) - Analog (subclass of PolesZeros) - Digital (subclass of Coefficients)
obsinfo.instrumentation.equipment module
InstrumentComponent class and subclasses Sensor, Preamplifier, Datalogger. Equipment class
- class obsinfo.instrumentation.equipment.Equipment(attributes_dict)
Bases:
obspy.core.inventory.util.Equipment
Equipment.
Equivalent to :class: obspy.core.inventory.util.Equipment
- type
- Type
str
- channel_modif
- Type
str
- selected_config
- Type
str
- description
- Type
str
- manufacturer
- Type
str
- model
- Type
str
- vendor
- Type
str
- serial_number
- Type
str
- installation_date
- Type
str in date format
- removal_date
- Type
str in date format
- calibration_dates
- Type
str in date format
- resource_id
- Type
str
- obspy_equipment
- Type
class obspy.core.inventory.equipmentEquipment
- __init__(attributes_dict)
Constructor
- Parameters
attributes_dict (dict or
ObsMetadata
) – attributes of component
- to_obspy()
Convert an equipment (including the equipment description in components) to its obspy object
- Returns
(
obspy.core.invertory.util.Equipment
)
obsinfo.instrumentation.location module
obsinfo.instrumentation.orientation module
Orientation class
- class obsinfo.instrumentation.orientation.Orientation(attributes_dict)
Bases:
object
Class for sensor orientations. No channel modifs. Cannot change orientation as it is part of the channel identifiers. Azimuth and dip can be changed Orientation is coded by FDSN standard <http://docs.fdsn.org/projects/ source-identifiers/en/v1.0/channel-codes.html>
- These are the dips to give for vertical/hydrophone channels:
- -90°:
vertical seismometer with positive voltage corresponding to upward motion (typical seismometer)
hydrophone with positive voltage corresponding to increase in pressure (compression)
- 90°: vertical seismometer with positive voltage corresponding to
downward motion (typical geophone),
hydrophone with positive voltage corresponding to decrease in pressure (dilatation)
- code
Single-letter orientation code
- Type
str
- azimuth
azimuth in degrees, clockwise from north
- Type
FloatWithUncert
- dip
dip in degrees, -90 to 90, positive=down, negative=up
- Type
FloatWithUncert
- __init__(attributes_dict)
Constructor
- Parameters
attributes_dict (dict or
ObsMetadata
) – Orientation dictionary with key = orientation code