本文整理汇总了Python中obspy.core.stream.Stream.clear方法的典型用法代码示例。如果您正苦于以下问题:Python Stream.clear方法的具体用法?Python Stream.clear怎么用?Python Stream.clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类obspy.core.stream.Stream
的用法示例。
在下文中一共展示了Stream.clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from obspy.core.stream import Stream [as 别名]
# 或者: from obspy.core.stream.Stream import clear [as 别名]
month=path[-2:]
lifile=glob.glob('*')
for days in [x+1 for x in range(31)]:
day=('%02d' % days)
for hours in [x for x in range(24)]:
hour=('%02d' % hours)
wav_files=[wav for wav in lifile if year in wav[0:4] \
and month in wav[5:7] \
and day in wav[8:10] \
and hour in wav[11:13]]
if not wav_files:
continue
else:
output_name='%s-%s-%s-%s00_%s.%s' % (year,month,day,hour,suffix,wav_format)
stream_wav=Stream()
for i in range(len(wav_files)):
stream_wav+=read(wav_files[i])
stream_wav.write(output_name,format=("%s" % wav_format))
stream_wav.clear()
shutil.move(output_name,("%s%s/%s/" % (final_base,year,month)))
print "Processing...%s...Please wait" % output_name
sys.exit()
# cat_wav=(' '.join(wav_files))
# cat_command('cat %s > %s-%s-%s-%s
# os.system(cat_command)
# print wav_files
# IPython.embed()
# 2008-07-21-1500_VANARC.MSEED