本文整理汇总了Python中obspy.realtime.RtTrace.copy方法的典型用法代码示例。如果您正苦于以下问题:Python RtTrace.copy方法的具体用法?Python RtTrace.copy怎么用?Python RtTrace.copy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类obspy.realtime.RtTrace
的用法示例。
在下文中一共展示了RtTrace.copy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_copy
# 需要导入模块: from obspy.realtime import RtTrace [as 别名]
# 或者: from obspy.realtime.RtTrace import copy [as 别名]
def test_copy(self):
"""
Testing copy of RtTrace object.
"""
rtr = RtTrace()
rtr.copy()
# register predefined function
rtr.registerRtProcess('integrate', test=1, muh='maeh')
rtr.copy()
# register ObsPy function call
rtr.registerRtProcess(filter.bandpass, freqmin=0, freqmax=1, df=0.1)
rtr.copy()
# register NumPy function call
rtr.registerRtProcess(np.square)
rtr.copy()
示例2: test_rt_kurtosis_dec
# 需要导入模块: from obspy.realtime import RtTrace [as 别名]
# 或者: from obspy.realtime.RtTrace import copy [as 别名]
def test_rt_kurtosis_dec(self):
win=5.0
data_trace=self.data_trace_filt.copy()
data_trace_dec=self.data_trace_filt.copy()
# no need to filter as we're using a pre-filtered trace
data_trace_dec.decimate(5,no_filter=True)
rt_trace=RtTrace()
rt_dec=RtTrace()
rt_trace.registerRtProcess('kurtosis',win=win)
rt_dec.registerRtProcess('kurtosis',win=win)
rt_trace.append(data_trace, gap_overlap_check = True)
rt_dec.append(data_trace_dec, gap_overlap_check = True)
newtr=rt_trace.copy()
newtr.decimate(5, no_filter=True)
#assert_array_almost_equal(rt_dec.data, newtr.data, 0)
diff=(np.max(rt_dec.data)-np.max(newtr.data)) / np.max(rt_dec.data)
self.assertAlmostEquals(np.abs(diff) , 0.0, 2)