Closed iceseismic closed 7 years ago
Ahhh, I've just written that up at:
It's a problem with empty Entities being produced by beta service I believe. First appears for empty PolesZero entity but could be larger problem.
To summarise, it appears that the FDSN station webservice is adding empty elements for poles and zeros when they don't exist in the source stationXML. Need to only add elements if they exist. @junghao can you follow up on this, you can talk to @mabznz if you have questions.
should be fixed and deployed
@mabznz, can you please test this to confirm the issue is resolved? Thanks
Can confirm this was an issue with obspy for both python 2 and 3 but is now fixed with change.
#! /usr/bin/python3.5
from obspy.clients.fdsn import Client
client = Client(base_url='http://beta-service.geonet.org.nz/')
inventory = client.get_stations(network="NZ",level="response")
byron@byron-Latitude-E7250:~/obspy$ ./beta_fsdn_stations.py
Inventory created at 2017-05-24T14:14:25.000000Z
Created by: Delta
Sending institution: GeoNet (WEL(GNS_Test))
Contains:
Networks (1):
NZ
Stations (915):
NZ.A11...
Using beta-service,
inventory = client.get_stations(station="ALRZ", level="channel") works fine,
but inventory = client.get_stations(station="ALRZ", level="response") completely bombs out with problems with paz