Inventory

class mss_dataserver.geometry.inventory.Inventory(name, type=None)[source]

Bases: object

The geometry inventory.

Manage sensors, recorders, stations, networks and arrays of a seismic monitoring network.

Parameters
  • name (str) – The name of the inventory.

  • type (str) – The type of the inventory.

Variables
  • recorders (list of Recorder) – The recorders of the inventory.

  • sensors (list of Sensor) – The sensors of the inventory.

  • networks (list of Network) – The networks of the inventory.

  • arrays (list of Array) – The arrays of the inventory.

Methods

__init__(name[, type])

Initialize the instance.

add_array(array)

Add a new array to the inventory.

add_network(network)

Add a new network to the database inventory.

add_recorder(recorder)

Add a recorder to the inventory.

add_sensor(sensor_to_add)

Add a sensor to the inventory.

add_station(network_name, station_to_add)

Add a station to the inventory.

as_dict([style])

Convert the inventory to a dictionary.

clear()

Clear all elements in the inventory.

compute_utm_coordinates()

Compute the UTM coordinates of all stations in the inventory.

from_db_inventory(db_inventory)

Not yet implemented.

from_dict(d)

Create an inventory from a dictionary.

get_array(**kwargs)

Get an array from the inventory.

get_channel(**kwargs)

Get a chennel from the inventory.

get_channel_from_stream([start_time, end_time])

Get the channels to which a stream is assigned to.

get_component(**kwargs)

Get a component of a sensor from the inventory.

get_network(**kwargs)

Get a network from the inventory.

get_recorder(**kwargs)

Get a recorder from the inventory.

get_sensor(**kwargs)

Get a sensor from the inventory.

get_station(**kwargs)

Get a station from the inventory.

get_stream(**kwargs)

Get a stream of a recorder from the inventory.

get_utm_epsg()

Compute a the epsg code of the best fitting UTM coordinate system.

has_changed()

Check if any element in the inventory has been changed.

import_from_xml(filename)

Read the inventory from a XML file.

merge(merge_inventory)

Merge two inventories.

refresh_recorders()

Refresh the inventory recorders.

remove_network(name)

Remove a network from the inventory.

remove_network_by_instance(network_to_remove)

Remove a network instance from the inventory.

remove_recorder_by_instance(recorder)

Remove a recorder from the inventory.

remove_sensor_by_instance(sensor_to_remove)

Remove a sensor from the inventory.

remove_station(nsl)

Remove a station from the inventory.

update_networks()

Refresh the inventory networks.

Inheritence diagram

Inheritance diagram of mss_dataserver.geometry.inventory.Inventory