当前位置: 首页>>代码示例>>Python>>正文


Python Client.getWaveform方法代码示例

本文整理汇总了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
开发者ID:jrhartog,项目名称:REDPyAlpha,代码行数:34,代码来源:trigger.py


注:本文中的obspy.fdsn.Client.getWaveform方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。