mt_metadata.timeseries.tools package

Submodules

mt_metadata.timeseries.tools.from_many_mt_files module

Created on Thu Oct 7 16:31:55 2021

@author: jpeacock

class mt_metadata.timeseries.tools.from_many_mt_files.MT2StationXML(xml_path=None)[source]

Bases: XMLInventoryMTExperiment

A class to convert multiple MT xml files into a stationXML (MTML)

This is for a use case of A. Kelbert who places each level of metadata into a single XML file. This class collects all those files and puts them into the proper order.

She has the files named as follows

survey.xml –> Survey metadata mt_metadata.timeseries.Survey filters.xml –> All filters station.xml –> Station metadata mt_metadata.timeseries.Station station.run.xml –> Run metadata mt_metadata.timeseries.Run station.run.channel.xml –> Channel metadata mt_metadata.timeseries.Channel

property filters
get_mt_channel(ch_fn, filters_fn)[source]

have a look at an mt channel

get_xml_files() list[source]

Get all mtml xml files for a given station.

has_xml_path()[source]
static is_a_channel_xml(fn)[source]
static is_a_filter_xml(fn)[source]
static is_a_run_xml(fn)[source]
static is_a_station_xml(fn)[source]
static is_a_survey_xml(fn)[source]
make_df()[source]

Make a pandas data frame for easier querying

Returns:

DESCRIPTION

Return type:

TYPE

make_experiment(stations=None)[source]

Create an MTML experiment from the a directory of xml files :return: DESCRIPTION :rtype: TYPE

static read_xml_file(xml_file)[source]

read an xml file an return an xml element

Parameters:

xml_file (TYPE) – DESCRIPTION

Returns:

DESCRIPTION

Return type:

TYPE

sort_by_station(stations=None)[source]

sort the file into station, runs and channels

Returns:

DESCRIPTION

Return type:

TYPE

property stations
property survey
property xml_path

Module contents

class mt_metadata.timeseries.tools.MT2StationXML(xml_path=None)[source]

Bases: XMLInventoryMTExperiment

A class to convert multiple MT xml files into a stationXML (MTML)

This is for a use case of A. Kelbert who places each level of metadata into a single XML file. This class collects all those files and puts them into the proper order.

She has the files named as follows

survey.xml –> Survey metadata mt_metadata.timeseries.Survey filters.xml –> All filters station.xml –> Station metadata mt_metadata.timeseries.Station station.run.xml –> Run metadata mt_metadata.timeseries.Run station.run.channel.xml –> Channel metadata mt_metadata.timeseries.Channel

property filters
get_mt_channel(ch_fn, filters_fn)[source]

have a look at an mt channel

get_xml_files() list[source]

Get all mtml xml files for a given station.

has_xml_path()[source]
static is_a_channel_xml(fn)[source]
static is_a_filter_xml(fn)[source]
static is_a_run_xml(fn)[source]
static is_a_station_xml(fn)[source]
static is_a_survey_xml(fn)[source]
make_df()[source]

Make a pandas data frame for easier querying

Returns:

DESCRIPTION

Return type:

TYPE

make_experiment(stations=None)[source]

Create an MTML experiment from the a directory of xml files :return: DESCRIPTION :rtype: TYPE

static read_xml_file(xml_file)[source]

read an xml file an return an xml element

Parameters:

xml_file (TYPE) – DESCRIPTION

Returns:

DESCRIPTION

Return type:

TYPE

sort_by_station(stations=None)[source]

sort the file into station, runs and channels

Returns:

DESCRIPTION

Return type:

TYPE

property stations
property survey
property xml_path