本文整理汇总了Python中obspy.core.stream.Stream.count方法的典型用法代码示例。如果您正苦于以下问题:Python Stream.count方法的具体用法?Python Stream.count怎么用?Python Stream.count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类obspy.core.stream.Stream
的用法示例。
在下文中一共展示了Stream.count方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Stream
# 需要导入模块: from obspy.core.stream import Stream [as 别名]
# 或者: from obspy.core.stream.Stream import count [as 别名]
# Create the Stream obj and populate it
st = Stream()
for (_, rec) in df.iterrows():
fname = os.path.join(rec['path'], rec['file'])
for tr in _read(fname, fformat, headonly=False, **kwargs).traces:
if (networks_ok) and (tr.stats.network not in networks):
continue
if (stations_ok) and (tr.stats.station not in stations):
continue
if (locations_ok) and (tr.stats.location not in locations):
continue
if (channels_ok) and (tr.stats.channel not in channels):
continue
st.append(tr)
if st.count() > 0:
# If the starttime is given then it trims the resulting traces
if starttime:
st.trim(starttime=starttime, endtime=endtime,
nearest_sample=nearest_sample)
st.merge(method=1, fill_value=0, interpolation_samples=1)
else:
print "Empty stream"
n_trace = st.count()
return st, n_trace
if BC_UI:
class _stream_dbread_view(HasTraits):