本文整理匯總了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