obsinfo.subnetwork package

Contains the main classes from Subnetwork to Station

Subnetwork class

class obsinfo.subnetwork.Subnetwork(attributes_dict=None, debug=False)

Bases: object

Equivalent to obspy/StationXML Network

network

FDSN network

Type:

Network

stations_operators

default operators for all stations

Type:

Operators

stations
Type:

list of Station

comments
Type:

list of str

extras
Type:

list of str

add_extras_to_comments()

Convert info file extras to XML comments

to_obspy()

Convert subnetwork object to obspy object

Returns:

class:~obspy.core.inventory.network.Network): corresponding

obspy Network

Return type:

(

Network class

class obsinfo.subnetwork.Network(attributes_dict=None)

Bases: object

Equivalent to obspy/StationXML Network

code
Type:

str

name
Type:

str

operators

operators

Type:

Operators

start_date

network start date

Type:

str with date format

end_date

network end date

Type:

str with date format

description

network description

Type:

str

comments
Type:

list of str

restricted_status

‘open’, ‘closed’, or ‘partial’

Type:

str

source_id

network-level data source identifier in URI format

Type:

str

identifiers

persistent identifiers as URIs, scheme (prefix) will be extracted

Type:

list of str

classmethod to_yaml(representer, data)
yaml_tag = '!myYamlObjTag'

Station class

class obsinfo.subnetwork.Station(code, attributes_dict, stations_operators=None, stations_comments=None, leapseconds=None)

Bases: object

Station. Equivalent to obspy/StationXML Station

Methods convert info files to an instance of this class and convert the object to an obspy object.

code

FDSN station code (maximum 5 letters)

Type:

str

site

Site name

Type:

str

start_date

station start date

Type:

str with date format

end_date

station end date

Type:

str with date format

location_code

the station’s location code (and default Location for its channels)

Type:

str

restricted_status

status of station

Type:

str

locations

all possible locations for this station and its channels

Type:

list of Location

location

The Location corresponding to location_code

Type:

Location

instrumentation (:class:`.Instrumentation` or list of

Instrumentation): instrumentation(s) used at this station

comments

station-level comments, including comments generated from extras and processing

Type:

Comments

source_id

StationXML sourceID (URI format)

Type:

str

identifiers

(list of str): permanent identifiers (URI format)

external_references

external references, each one is a dict with keys [‘uri’, ‘description’]

Type:

list of dict

water_level

elevation (m) of water surface (useful for lakes)

Type:

number

to_obspy()

Convert station object to obspy object

Returns:

corresponding obspy Station object

Return type:

(obspy.core.inventory.station.Station)

Stations class

class obsinfo.subnetwork.Stations(stations_dict, operators, comments, leapseconds=None)

Bases: ObsinfoClassList

A list of Station objects

Operator class

class obsinfo.subnetwork.Operator(attributes_dict)

Bases: object

Contact information for the operator of the instrumentation or network

agency

Reference name of agency

Type:

str

contacts
Type:

Persons

website

operator website

Type:

str

to_obspy()
classmethod to_yaml(representer, data)
yaml_tag = '!myYamlObjTag'

Operators class

class obsinfo.subnetwork.Operators(seq)

Bases: ObsinfoClassList

A list of Operator objects

classmethod to_yaml(representer, data)
yaml_tag = '!myYamlSeqTag'

Site class

class obsinfo.subnetwork.Site(obj)

Bases: object

to_obspy()
classmethod to_yaml(representer, data)
yaml_tag = '!myYamlObjTag'

Processing class

class obsinfo.subnetwork.Processing(attributes, leapseconds=None)

Bases: object

No equivalent class in obspy/StationXML

Saves a list of Processing steps as strings For now, just stores the list. Will be converted to StationXML comments

processing_list

list of processing steps with attributes, either linear_drift or leapsecond

Type:

list

to_comments()

Returns processing list as Comments

Top level name becomes the Comment’s subject attribute, each element below becomes an individual Comment