mt_metadata.timeseries.stationxml.xml_station_mt_station

Created on Thu Feb 18 12:49:13 2021

copyright:

copyright:

Jared Peacock (jpeacock@usgs.gov)

license:

MIT

Attributes

inventory

Classes

XMLStationMTStation

translate back and forth between StationXML Station and MT Station

Module Contents

mt_metadata.timeseries.stationxml.xml_station_mt_station.inventory = None
class mt_metadata.timeseries.stationxml.xml_station_mt_station.XMLStationMTStation

Bases: mt_metadata.timeseries.stationxml.utils.BaseTranslator

translate back and forth between StationXML Station and MT Station

mt_translator
mt_comments_list = ['run_list', 'orientation.method', 'orientation.reference_frame', 'location.declination.value',...
xml_to_mt(xml_station)

Translate a StationXML station object to MT Station object.

Parameters:

xml_station (obspy.core.inventory.Station) – StationXML station element to convert.

Returns:

MT Station object with attributes populated from the XML station.

Return type:

mt_metadata.timeseries.Station

Raises:

ValueError – If input is not an obspy.core.inventory.Station object.

mt_to_xml(mt_station)

Convert MT Station to ObsPy StationXML Station object.

Parameters:

mt_station (mt_metadata.timeseries.Station) – MT Station object to convert.

Returns:

StationXML Station object with attributes populated from MT Station.

Return type:

obspy.core.inventory.Station

Raises:

ValueError – If input is not an mt_metadata.timeseries.Station object, or if both id and fdsn.id attributes are None.

Notes

Station code is set to uppercase in the resulting StationXML object.