In [ ]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
# Import the Parsers
from eqcat.parsers.isf_catalogue_reader import ISFReader
from eqcat.parsers.gcmt_ndk_parser import ParseNDKtoGCMT
from eqcat.parsers.converters import (GenericCataloguetoISFParser,
GenericCataloguetoGCMT,
GCMTtoISFParser)
In [ ]:
parser = ISFReader("inputs/isc_test_catalogue_isf.txt")
catalogue1 = parser.read_file("ISC_DB1", "ISC Global M >= 5")
print("Catalogue contains: %d events" % catalogue1.get_number_events())
In [ ]:
# Build Dataframes
origin_df1, magnitude_df1 = catalogue1.build_dataframe()
In [ ]:
origin_df1
In [ ]:
magnitude_df1
In [ ]:
parser2 = ISFReader("inputs/isc_test_catalogue_isf.txt",
selected_origin_agencies=["ISC", "EHB", "NEIC"],
selected_magnitude_agencies=["ISC", "EHB", "NEIC"])
catalogue2 = parser2.read_file("ISC_DB2", "ISC Global M >= 5")
print("Catalogue contains: %d events" % catalogue2.get_number_events())
In [ ]:
# Build Dataframes
origin_df2, magnitude_df2 = catalogue2.build_dataframe()
In [ ]:
origin_df2
In [ ]:
magnitude_df2
In [ ]:
gcmt_parser = ParseNDKtoGCMT("inputs/gcmt_test_catalogue.txt")
gcmt_cat = gcmt_parser.read_file()
print("GCMT Catalogue contains %d moment tensors" % gcmt_cat.number_events())
In [ ]: