Catalog.to_quakeml#

Catalog.to_quakeml(agencyID=' ', author=' ') str#

Convert the catalog to QuakeML format.

Parameters:
  • agencyID – Agency ID with which to store the catalog.

  • author – Author of the catalog.

Returns:

catalog – The catalog in QuakeML format.

Examples

>>> import pandas as pd
>>> from seismostats import Catalog
>>> cat = Catalog.from_dict({
...     'longitude': [42.35, 1.35, 2.35],
...     'latitude': [3.34444, 5.135, 2.134],
...     'depth': [5.5, 10.52, 50.4],
...     'time': pd.to_datetime(['1900-01-01 05:05:13',
...                             '1982-04-07 07:07:15',
...                             '2020-11-30 12:30:59']),
...     'magnitude': [1.0, 2.5, 3.9],
...     'magnitude_type': ['Ml', 'Ml', 'Ml'],
...     })
>>> cat.to_quakeml()
<?xml version="1.0" encoding="UTF-8"?>
<q:quakeml xmlns="http://quakeml.org/xmlns/bed/1.2"
    xmlns:q="http://quakeml.org/xmlns/quakeml/1.2">
...