當前位置: 首頁>>代碼示例>>Python>>正文


Python Client.station方法代碼示例

本文整理匯總了Python中obspy.iris.Client.station方法的典型用法代碼示例。如果您正苦於以下問題:Python Client.station方法的具體用法?Python Client.station怎麽用?Python Client.station使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在obspy.iris.Client的用法示例。


在下文中一共展示了Client.station方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: wavesdownloader

# 需要導入模塊: from obspy.iris import Client [as 別名]
# 或者: from obspy.iris.Client import station [as 別名]

#.........這裏部分代碼省略.........
        (downloadPath,ID) = user.run_circular_query( \
                            args.net,args.sta,args.cha, \
                            center[0],center[1],kmradius[0],kmradius[1], \
                            args.beg,args.end,aFORMAT)
      else: # i.e.: rectangular
        (downloadPath,ID) = user.run_rectangular_query( \
                            args.net,args.sta,args.cha, \
                            bbox[0],bbox[1],bbox[2],bbox[3], \
                            args.beg,args.end,aFORMAT)
    
      #set name and location of the fseed 
      archiveFile = downloadPath + os.sep + ID + "_data.tgz"
      (root,seed)=grabIngvEidaArchive(archiveFile,aFormat)
    
      # 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")
開發者ID:fabriziobernardi,項目名稱:wavesdownloader,代碼行數:70,代碼來源:func_wd.py


注:本文中的obspy.iris.Client.station方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。