mt_metadata.timeseries.stationxml.xml_inventory_mt_experiment

Created on Mon Feb 22 09:27:10 2021

copyright:

Jared Peacock (jpeacock@usgs.gov)

license:

MIT

Classes

XMLInventoryMTExperiment

Read the full files and put the elements in the appropriate locations.

Module Contents

class mt_metadata.timeseries.stationxml.xml_inventory_mt_experiment.XMLInventoryMTExperiment

Read the full files and put the elements in the appropriate locations.

logger
network_translator
station_translator
channel_translator
xml_to_mt(inventory_object=None, stationxml_fn=None, mt_fn=None)

Read in a StationXML using Obspy obspy.core.inventory.Inventory and convert to an MT mt_metadata.timeseries.Experiment

Parameters:
  • inventory_object (obspy.core.inventory.Inventory) – inventory object or StationXML file name

  • stationxml_fn (Path or string) – full path to StationXML file

  • mt_fn (Path or string) – full path to MT file

Returns:

DESCRIPTION

Return type:

TYPE

mt_to_xml(mt_experiment, mt_fn=None, stationxml_fn=None, ns_dict=None)

Convert from MT mt_metadata.timeseries.Experiment to obspy.core.inventory.Inventory

Parameters:
  • mt_experiment (TYPE) – DESCRIPTION

  • mt_fn (TYPE, optional) – DESCRIPTION, defaults to None

  • stationxml_fn (TYPE, optional) – DESCRIPTION, defaults to None

  • ns_dict (TYPE, optional) – DESCRIPTION, defaults to None

Raises:

ValueError – DESCRIPTION

Returns:

DESCRIPTION

Return type:

TYPE

add_run(xml_station, mt_run, filters_dict)

Check to see if channel information already exists in the channel list of an xml station.

Parameters:
  • xml_station (TYPE) – DESCRIPTION

  • xml_channel (TYPE) – DESCRIPTION

Returns:

DESCRIPTION

Return type:

TYPE

compare_xml_channel(xml_channel_01, xml_channel_02)

Compare xml channels to see if a new epoch needs to be made or not.

Parameters:
  • xml_channel_01 (TYPE) – DESCRIPTION

  • xml_channel_02 (TYPE) – DESCRIPTION

Returns:

DESCRIPTION

Return type:

TYPE