Open sbonaime opened 6 years ago
If I change neries_emsc = Client("EMSC") to neries_emsc = Client("IRIS") I don't have the error. But I don't know if IRIS catalogue should be used instead of EMSC...
The problem is the minmagnitude argument for EMSC
I propose to switch to IRIS instead of EMSC
I have this error
FDSNException: Bad request. If you think your request was valid please contact the developers. Detailed response of server:
Error 400: unknown : Cannot send body with 204 Request: /fdsnws/event/1/query?minmagnitude=7.0&endtime=2018-03-27T15%3A52%3A56.950000&starttime=2018-03-27T03%3A58%3A00.000000 Request Submitted: 2018-03-27T15:53:14.777101Z Service version: fdsnws-event: v 1.1.0
But the script still continues.. right? Just shows that message on stderr
? Because the get_events()
call seems to be properly encased in a try/except.
Could it be this was just a temporary problem?
I just did a quick comparison of what catalog data is returned for today (i.e. 12 hours backwards from realtime) with M>2 for each of the FDSNWS end points and it looks like in general EMSC catalog might be the best option for near-realtime data. ISC might be an obvious choice but it is not able to give data for near-realtime (newest event 4 hours behind realtime), seems like.
from obspy import UTCDateTime
from obspy.clients.fdsn import Client
from obspy.clients.fdsn.header import URL_MAPPINGS
t = UTCDateTime(2018, 4, 10)
for key in URL_MAPPINGS.keys():
client = Client(key)
try:
cat = client.get_events(starttime=t, minmagnitude=2)
except:
continue
cat.events = sorted(cat.events, key=lambda e: e.origins[0].time)
print key
print cat
print ''
cat.plot(outfile='/tmp/events/%s.png' % key, show=False)
EMSC
75 Event(s) in Catalog:
2018-04-10T00:10:45.000000Z | -40.770, -72.920 | 3.2 ml | manual
2018-04-10T00:13:01.200000Z | +35.510, +22.370 | 2.2 ml | manual
...
2018-04-10T11:50:46.000000Z | +15.890, -98.050 | 4.1 m | manual
2018-04-10T12:10:44.700000Z | +43.440, +18.790 | 3.0 ml | automatic
ISC
34 Event(s) in Catalog:
2018-04-10T00:13:49.250000Z | +43.059, +13.032 | 2.0 ML
2018-04-10T00:14:59.970000Z | +45.472, +26.258 | 3.1 ml
...
2018-04-10T08:36:41.480000Z | +43.067, +13.048 | 2.0 ML
2018-04-10T08:52:59.000000Z | +36.384, -120.966 | 2.5 M
USGS
21 Event(s) in Catalog:
2018-04-10T00:05:26.250000Z | +63.462, -150.983 | 2.4 ml | automatic
2018-04-10T00:23:04.020000Z | +33.493, -116.800 | 2.27 ml | automatic
...
2018-04-10T10:19:34.030000Z | -30.986, -71.557 | 6.2 mww | manual
2018-04-10T11:41:06.990000Z | +41.354, -100.127 | 3.7 mb_lg | manual
IRIS
21 Event(s) in Catalog:
2018-04-10T00:05:26.508000Z | +63.477, -150.906 | 2.4 Ml
2018-04-10T00:23:04.020000Z | +33.493, -116.800 | 2.27 Ml
...
2018-04-10T10:19:34.030000Z | -30.986, -71.557 | 6.2 Mww
2018-04-10T11:41:06.990000Z | +41.354, -100.127 | 3.7 mb_Lg
Pics for best candidates:
EMSC
ISC
IRIS
USGS
With this command line both on mac or RaspberryPi
seedlink-plotter --seedlink_server rtserver.ipgp.fr:18000 -s G_SSB:00BHZ -b 12h --events 7
I have this error