本文整理汇总了Python中obspy.core.Stats.delta方法的典型用法代码示例。如果您正苦于以下问题:Python Stats.delta方法的具体用法?Python Stats.delta怎么用?Python Stats.delta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类obspy.core.Stats
的用法示例。
在下文中一共展示了Stats.delta方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _create_trace
# 需要导入模块: from obspy.core import Stats [as 别名]
# 或者: from obspy.core.Stats import delta [as 别名]
def _create_trace(data, channel, starttime, delta=60.):
stats = Stats()
stats.channel = channel
stats.delta = delta
stats.starttime = starttime
stats.npts = len(data)
data = numpy.array(data, dtype=numpy.float64)
return Trace(data, stats)
示例2: read_specfem_seismogram
# 需要导入模块: from obspy.core import Stats [as 别名]
# 或者: from obspy.core.Stats import delta [as 别名]
def read_specfem_seismogram(output_files, network, station, band):
st = Stream()
for component in 'ZNE':
channel = '%sX%s' % (band, component)
filename = os.path.join(output_files,
'%s.%s.%s.sem.ascii' % (network, station,
channel))
tmp = np.genfromtxt(filename)
stats = Stats()
stats.network = network
stats.station = station
stats.channel = channel
stats.delta = tmp[1, 0] - tmp[0, 0]
stats.npts = tmp.shape[0]
stats.starttime = tmp[0, 0]
tr = Trace(tmp[:, 1], stats)
st += tr
return st
示例3: test_delta_zero
# 需要导入模块: from obspy.core import Stats [as 别名]
# 或者: from obspy.core.Stats import delta [as 别名]
def test_delta_zero(self):
"""
Make sure you can set delta = 0. for #1989
"""
stat = Stats()
stat.delta = 0