Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graeme Weatherill
shakyground2
Commits
941e6cec
Commit
941e6cec
authored
May 05, 2022
by
g-weatherill
Browse files
Fixes bug in quakeml reader, wrong magnitudes
parent
f5d040a5
Pipeline
#42496
failed with stage
in 12 minutes and 40 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
shakyground2/io/import_fdsnws_eq.py
View file @
941e6cec
...
...
@@ -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
:
...
...
tests/earthquake_test.py
View file @
941e6cec
...
...
@@ -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
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment