Commit 941e6cec authored by g-weatherill's avatar g-weatherill
Browse files

Fixes bug in quakeml reader, wrong magnitudes

parent f5d040a5
Pipeline #42496 failed with stage
in 12 minutes and 40 seconds
......@@ -86,6 +86,8 @@ def fetch_magnitude(
for m in root[0][0].findall("ns:magnitude", ns):
if m.attrib["publicID"] != preferredmagnitudeID:
continue
else:
break
child = m.find("ns:mag", ns)
if child is None:
......@@ -153,7 +155,6 @@ def fetch_quakeml_ws(evid: str) -> str:
)
)
)
req = ul.Request(url)
u = ul.urlopen(req)
if u.code != 200:
......
......@@ -215,7 +215,7 @@ class EarthquakeTestCase(unittest.TestCase):
target_string_set = [
"gfz2021kdvq 2021-05-25 09:41:17.200000 (29.35200E, -1.74600N, 10.00 km) M 4.39",
"gfz2021keus 2021-05-25 22:21:36.400000 (122.49800E, 24.83200N, 10.00 km) M 4.56",
"gfz2021kduj 2021-05-25 09:03:03.390000 (29.48400E, -1.78600N, 10.00 km) M 4.59",
"gfz2021kduj 2021-05-25 09:03:03.390000 (29.48400E, -1.78600N, 10.00 km) M 4.37",
]
results = []
for event_id in event_id_set:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment