本文整理匯總了Python中obspy.iris.Client.bulkdataselect方法的典型用法代碼示例。如果您正苦於以下問題:Python Client.bulkdataselect方法的具體用法?Python Client.bulkdataselect怎麽用?Python Client.bulkdataselect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類obspy.iris.Client
的用法示例。
在下文中一共展示了Client.bulkdataselect方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: wavesdownloader
# 需要導入模塊: from obspy.iris import Client [as 別名]
# 或者: from obspy.iris.Client import bulkdataselect [as 別名]
#.........這裏部分代碼省略.........
# get stream
try:
dataStreamEida = read(seed)
except:
print "no data found or no response from Eida server"
# if iris is on
if args.server[1] == 1:
# Convert some args for eida syntax
args.net=reformatNetStaList(args.net,"iris")
args.sta=reformatNetStaList(args.sta,"iris")
args.cha=reformatNetStaList(args.cha,"iris")
# initialize downloader
print "\n \nDownloading from iris"
if args.mode == "circular":
response = irisClient.availability( \
network=args.net, station=args.sta, channel=args.cha, \
location=args.loc,starttime=t1, endtime=t2, \
lat=center[0], lon=center[1], minradius=grradius[0], maxradius=grradius[1])
else: # i.e.: rectangular
IrisBox = setIrisRectBox(bbox)
response = irisClient.availability( \
network=args.net, station=args.sta, channel=args.cha, \
location=args.loc,starttime=t1, endtime=t2,\
minlat=IrisBox[0], minlon=IrisBox[1], maxlat=IrisBox[2], maxlon=IrisBox[3])
# Download
try:
dataStreamIris = irisClient.bulkdataselect(response)
# here save mseed file format
dataStreamIris.write(args.outdir + os.sep + 'iris.' + ID + '_data.mseed',format='MSEED', encoding='STEIM2')
except:
print "IRIS bulkdataselect returns False. No data from IRIS\n\n"
#
# if local is on
if args.server[2] == 1:
print "\n \nExtracting from local fseed"
dataStreamLoca=read(args.fsfile)
# if ARClink - WEBDC is on
if args.server[3] == 1:
print "\n \nDownloading from WEBDC via ArcLink"
# Convert some args for eida syntax
args.net=reformatNetStaList(args.net,"iris")
args.sta=reformatNetStaList(args.sta,"iris")
args.cha=reformatNetStaList(args.cha,"iris")
# get station list available
Inventory=getInventoryViaArcLink(t1,t2,center,grradius,bbox,args)
# download data
dataStreamWbDc=getDataViaArcLink(t1,t2,Inventory,args)
if len(dataStreamWbDc) > 0:
dataStreamWbDc.write(args.outdir + os.sep + 'webdc.' + ID + '_data.mseed',format='MSEED', encoding='STEIM2')
############################################################
# Check if only empty data
if(len(dataStreamIris) + len(dataStreamEida) + len(dataStreamLoca) + len(dataStreamWbDc)<=0):