[obspy-users] Difficulty with getPAZ
aringler at usgs.gov
Mon Aug 19 18:38:02 CEST 2013
I am probably doing something dumb, but I am having a hard time using the
getPAZ on the IC network dataless (
http://www.iris.edu/pub/RESPONSES/DATALESS_SEEDS/IC.dataless). When I run
through a scan of the blockettes (blockette 50 and 52) I get the existence
of such blockettes. However, I am unable to run getPAZ to retrieve the
response information. This only appears to be a problem with historical
epochs. I am able to retrieve the present epoch without any issues.
Below is the script I am running along with the output. Thanks for any
ideas anyone can shed on this.
Thanks for your help,
from obspy.core import UTCDateTime
from obspy.xseed import Parser
#Get the PAZ from the following station
net = "IC"
sta = "BJT"
chan = "LHE"
loc = "00"
attime = UTCDateTime(2011,01,01,01,01,01)
#Read in the IC dataless
sp = Parser('IC.dataless')
#Run through the dataless and try to find station sta
for cursta in sp.stations:
for blkt in cursta:
if blkt.id == 50:
#Find a blockette 50 and get the station call letters
stacall = blkt.station_call_letters.strip()
if stacall == sta and blkt.id == 52:
#Next we use blockette 52 to get the channel
if blkt.channel_identifier.strip() == chan and
blkt.location_identifier.strip() == loc:
#Lets print the start and end date for this sta chan and loc
print "Here is the start:" + str(blkt.start_date)
print "Here is the end:" + str(blkt.end_date)
paz=sp.getPAZ(net + '.' + sta + '.' + loc + '.' + chan ,datetime=attime)
print "Can not find a paz"
[aringler at aslres01 syncomppython]$ ./checkICdataless.py
UserWarning: Date is required.
warnings.warn('Date is required.', UserWarning)
Here is the start:1999-02-10T00:00:00.000000Z
Here is the end:2010-10-19T00:00:00.000000Z
Here is the start:2010-10-19T00:00:00.000000Z
Here is the end:2013-04-17T00:00:00.000000Z
Can not find a paz
[aringler at aslres01 syncomppython]$
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the obspy-users