swiss-seismological-service/SeismoStats

Bug in download function

aronsho opened this issue · 0 comments

When the minimum latitude is zero, the download function does not work well (earthquakes at lower latitudes are not filtered out correctly). Here's an example code that produces the error:

==============================

start_time = pd.to_datetime('2020/01/01')
end_time = pd.to_datetime('2022/01/01')
min_latitude = 0
max_latitude = 40
min_magnitude = 5

url = 'http://service.scedc.caltech.edu/fdsnws/event/1/query'
client = FDSNWSEventClient(url)
df_sed = client.get_events(
start_time=start_time,
end_time=end_time,
min_magnitude=min_magnitude,
min_longitude=min_longitude,
max_longitude=max_longitude,
min_latitude=min_latitude,
max_latitude=max_latitude)

==============================

Although the minim latitude is supposed to be zero, there are earthquakes with latitudes lower than -40 present in the data. This problem is not there anymore when minimum_latitude = -1 is chosen.