Catalog

class mss_dataserver.event.core.Catalog(name, db_id=None, description=None, agency_uri=None, author_uri=None, creation_time=None, events=None)[source]

Bases: object

A catalog holding seismic events.

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

  • db_id (int) – The database id of the catalog.

  • description (str) – The description of the catalog.

  • agency_uri (str) – The uniform resource identifier of the author agency.

  • author_uri (str) – The uniform resource identifier of the author.

  • creation_time (str or obspy.UTCDateTime) – The creation time of the event. A string that can be parsed by obspy.UTCDateTime or a obspy.UTCDateTime instance.

  • events (list of Event) – The events of the catalog.

Variables

logger (logging.Logger) – The logger of the instance.

Methods

__init__(name[, db_id, description, …])

Instance initialization.

add_events(events)

Add one or more events to the events.

clear_events()

Clear the events list.

from_orm(db_catalog, inventory[, load_events])

Convert a database orm mapper catalog to a catalog.

get_events([start_time, end_time])

Get events using search criteria passed as keywords.

get_events_db_data(project)

Get a list of mapper class instances for bulk insert.

load_events(project[, start_time, end_time, …])

Load events from the database.

write_to_csv(filepath)

Write the events in the catalog to CSV file.

write_to_database(project[, …])

Write the catalog to the database.

Inheritence diagram

Inheritance diagram of mss_dataserver.event.core.Catalog