Closed calum-chamberlain closed 5 years ago
Thanks for drawing our attention to this.
I have checked using the URL query, such as:
https://service.geonet.org.nz/fdsnws/station/1/query?network=NZ&station=RPZ&location=10&channel=HHZ&starttime=2010-08-20T00:00:00.000&endtime=2010-08-21T00:00:00.0000&level=response
And the query above returned all time periods for the channel, like you said it did with obspy. It should only return the response that is valid for the time period requested.
I will ask one of the team to look into this issue and if there was a reason it was implemented this way. If not, we will correct it so that it only returns the response or responses valid for the time period requested.
:tada: Thanks @nbalfour. Just in case anyone stumbles across this and needs a work around, Inventory
objects have a .select()
method, so you can get rid of extraneous information if you need to:
from obspy import UTCDateTime
from obspy.clients.fdsn import Client
client = Client("GEONET")
inv = client.get_stations(
network="NZ", station="RPZ", location="10", channel="HHZ",
starttime=UTCDateTime(2010, 8, 20),
endtime=UTCDateTime(2010, 8, 21), level='response')
inv = inv.select(starttime=UTCDateTime(2010, 8, 20), endtime=UTCDateTime(2010, 8, 21))
thanks for this ! I had to have a work around using obspy (creating an array of responses) to select the right time periods ... the "starttime/endtime" naming was not helping to understand.
Requesting station information using the obspy FDSN client results in the expected response for
level=channel
, but returns all channels for all time withlevel=response
.Consider:
The second assert Fails because four channels are returned, which extend beyond the period requested.