Hello obs-py community,
I’m not a seismologist by background, so please forgive some of my naivety!
I’ve been trying to download some waveforms associated with some stations, and as far as I can gather from the docs, this should work:
from obspy.clients.fdsn import Client
from obspy.core import UTCDateTime
client = Client(“ORFEUS”)
t1 = UTCDateTime(2018, 10, 11, 17, 15, 22, 497918)
t2 = UTCDateTime(2018, 10, 18, 17, 15, 22, 497918)
r = client.get_waveforms(‘Z3’,‘A089A’, ‘‘,’’,t1,t2, attach_response=True)
However, this returns an error:
Traceback (most recent call last):
File “”, line 1, in
File “/Users/chris/.local/share/virtualenvs/arch-NdiSQAf2/lib/python3.7/site-packages/obspy/clients/fdsn/client.py”, line 830, in get_waveforms
data_stream = self._download(url, use_gzip=False)
File “/Users/chris/.local/share/virtualenvs/arch-NdiSQAf2/lib/python3.7/site-packages/obspy/clients/fdsn/client.py”, line 1382, in _download
raise_on_error(code, data)
File “/Users/chris/.local/share/virtualenvs/arch-NdiSQAf2/lib/python3.7/site-packages/obspy/clients/fdsn/client.py”, line 1706, in raise_on_error
server_info)
obspy.clients.fdsn.header.FDSNNoDataException: No data available for request.
Detailed response of server:
(note that the ‘detailed response of server’ is null!)
I thought that this network/station combination was valid because if I run
for n in client.get_stations(): print(b)
I get
…
Network Z3 (AlpArray Seismic Network (AASN) temporary component)
…
Stations (66):
…
Z3.A089A (Nesovice, Czech Republic)
…
A couple of things confused me that might be contributing to errors I’m probably making:
- Client.get_stations() appears to return instances of the Network class, rather than instance of the Station class:
type(client.get_stations()[0])
<class ‘obspy.core.inventory.network.Network’>
which itself contains an iterable containing instances of Station:
type(client.get_stations()[0][0])
<class ‘obspy.core.inventory.station.Station’>
- The channels metadata doesn’t seem to be available for the calls I’m trying. For example, this only returns empty lists:
for s in client.get_stations():
for n in s: print(n.channels)
and printing an arbitrary channel doesn’t reveal the channel info either, despite all the other metadata being printed:
print(client.get_stations()[0][0])
Station E064 (La Canada de Mira)
Station Code: E064
Channel Count: None/None (Selected/Total)
2009-07-19T15:25:47.000000Z - 2010-10-19T10:55:00.000000Z
Access: open
Latitude: 39.66, Longitude: -1.46, Elevation: 935.0 m
Available Channels:
- is it possible to list the available channels? Valid channels just seem to a string value - are these defined as constants anywhere?
Any hints as to things I’m doing wrong (or links to docs to help my understanding) would be gratefully received!
Cheers
Chris