本文整理汇总了Python中obspy.fdsn.Client.getWaveform方法的典型用法代码示例。如果您正苦于以下问题:Python Client.getWaveform方法的具体用法?Python Client.getWaveform怎么用?Python Client.getWaveform使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类obspy.fdsn.Client
的用法示例。
在下文中一共展示了Client.getWaveform方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getCatData
# 需要导入模块: from obspy.fdsn import Client [as 别名]
# 或者: from obspy.fdsn.Client import getWaveform [as 别名]
def getCatData(date, opt):
"""
Download data from IRIS or Earthworm waveserver with padding and filter it. This is
a specialized version getData() for catalog events, pulling a smaller amount of time
around a known event.
date: UTCDateTime of known catalog event
opt: Options object describing station/run parameters
Returns ObsPy stream object
"""
# Choose where data are downloaded automatically via options
# Download data with padding to account for triggering algorithm
# Make overlap symmetric
if opt.server == "IRIS":
client = Client("IRIS")
st = client.get_waveforms(opt.network, opt.station, opt.location, opt.channel,
date - opt.atrig, date + 3*opt.atrig)
else:
client = EWClient(opt.server, opt.port)
st = client.getWaveform(opt.network, opt.station, opt.location, opt.channel,
date - opt.atrig, date + 3*opt.atrig)
st = st.detrend() # can create noise artifacts??
st = st.merge(method=1, fill_value='interpolate')
st = st.filter("highpass", freq=opt.fhigh, corners=2,
zerophase=True)
return st