hello, when I try to eliminate the instrumental response using the obspy example code, I produce an error line stream = rs.get_waveforms (‘AM’, stn, ‘00’, ‘EHZ’, start, end) which I show and do not know How to solve. Help me please!!
It looks like your station was offline during January 1. Here’s a way to check the times that the server has data for your station:
from obspy import UTCDateTime from obspy.clients.fdsn.client import Client rs = Client(base_url='https://fdsnws.raspberryshakedata.com/') start = UTCDateTime(2016, 12, 1, 0, 0, 0) end = UTCDateTime.now() stn = 'R909F' # the following command does the same thing as read_inventory() inv = rs.get_stations(network='AM', station=stn, location='00', starttime=start, endtime=end, level='resp') for p in inv: print(str(p.start_date) + ' - ' + str(p.end_date))
Inventory objects might be confusing at first but they are explained fairly well in the obspy tutorial: https://docs.obspy.org/packages/obspy.core.html#station-metadata
One useful thing about them is that they contain start and end times for when data is available.
This is the output I get for R909F data start and end times. Note that there is no data on the server from 2019-12-31 to 2020-01-02, so when you try to download waveforms from 2020-01-01, you will get a
FDSNNoDataException from the server.
2019-04-08T23:00:28.065000Z - 2019-04-21T20:10:16.127000Z 2019-07-31T17:06:53.986000Z - 2019-07-31T22:43:15.243000Z 2019-07-31T22:43:15.244000Z - 2019-10-13T17:00:14.814000Z 2019-10-14T17:16:23.323000Z - 2019-10-14T17:30:45.093000Z 2019-10-14T17:30:45.094000Z - 2019-12-31T17:00:16.445000Z 2020-01-02T15:15:57.241000Z - 2020-01-02T17:00:15.588000Z 2020-01-03T14:15:44.071000Z - 2020-01-03T17:00:16.826000Z 2020-01-06T14:22:16.806000Z - 2020-01-06T17:00:18.526000Z 2020-01-07T14:29:52.864000Z - 2020-01-07T17:00:16.802000Z 2020-01-08T14:33:08.319000Z - 2020-01-08T17:00:16.746000Z 2020-01-17T20:54:53.668000Z - None
So to solve your problem, request data from February 1 instead of January 1. To do that, change the following variables in your script:
start = UTCDateTime(2020, 2, 1, 0, 0, 0) end = UTCDateTime(2020, 2, 1, 0, 30, 0)
Then request the
stream = rs.get_waveforms('AM', stn, '00', 'EHZ', start, end)