Skip to content

Instantly share code, notes, and snippets.

@calum-chamberlain
Created February 22, 2016 22:37
Show Gist options
  • Save calum-chamberlain/dfb2fa3a4cebff00729f to your computer and use it in GitHub Desktop.
Save calum-chamberlain/dfb2fa3a4cebff00729f to your computer and use it in GitHub Desktop.
Current work-around for GeoNet event query
from obspy.clients.fdsn import Client
publicIDs=['2016p008122', '2016p008353', '2016p008155', '2016p008194']
client = Client("GEONET")
catalog = Catalog()
for publicID in publicIDs:
data_stream = client._download('http://quakeml.geonet.org.nz/' +
'quakeml/1.2/' + publicID)
data_stream.seek(0, 0)
catalog += read_events(data_stream, format="quakeml")
data_stream.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment