DbChannel

class mss_dataserver.geometry.db_inventory.DbChannel(orm=None, **kwargs)[source]

Bases: mss_dataserver.geometry.inventory.Channel

The database channel.

Parameters

orm (mss_data_server.geometry.databaseFactory.GeomChannel) – The sqlalchemy table mapper class for the channel.

Keyword Arguments

**kwargs – The keyword arguments passed to the __init__ method of the parent class mss_dataserver.geoemetry.inventory.Channel.

Properties

assigned_recorders

list of str: The unique serial numbers of the assigned recorders.

id

int: The database id.

nslc

tuple of str: The Network:Station:Location:Channel code.

nslc_string

str: The string representation of the Network:Station:Location:Channel code.

parent_inventory

Inventory: The inventory containing the channel.

Methods

__init__([orm])

Initialize the instance

add_stream(serial, model, producer, name, …)

Add a stream to the channel.

as_dict([style])

Get a dictionary representation of the instance.

from_dict(d)

Create a channel from a dictionary.

from_inventory_instance(parent_station, instance)

Create a DbChannel instance from a mss_data_server.geometry.inventory.Channel instance.

from_sqlalchemy_orm(parent_station, orm)

Create a DbChannel instance from a mss_data_server.geometry.databaseFactory.GeomChannel table mapper class.

get_stream([start_time, end_time])

Get a stream from the channel.

merge(merge_channel)

Merge a channel with the existing one.

remove_stream([start_time, end_time])

Remove a stream from the channel.

remove_stream_by_instance(stream_timebox)

Remove a stream timebox.

Inheritence diagram

Inheritance diagram of mss_dataserver.geometry.db_inventory.DbChannel