obsby,从SDS文件结构读取文件

2024-06-25 07:10:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用obspy模块将本地SDS文件结构中的miniseed文件读入obspy流对象。{{a3}使用了{a3}的本地结构,但返回了一个空的SDS}结构。对于处理文件导入的代码部分,我在python中没有发现任何错误。在

以下是我的文件结构示例,它表示2011年,第315天,Network-OZLLOC1,Station-6F20,Location-B,Channel-E,Type-D:

"SDS_root" / 2011 / OZLLOC1 / 6F20 / E.D / OZLLOC1.6F20.B.E.D.2011.022.msd

任何我的文件导入代码:

import Tkinter, tkFileDialog
from obspy.core import UTCDateTime
from obspy.clients.filesystem.sds import Client

root = Tkinter.Tk()
root.withdraw()
SDS_root = tkFileDialog.askdirectory(initialdir=os.getcwd(), parent=root,
                                     title='Browse to SDS root dir')

client = Client(SDS_root, sds_type='D', format='*')
t = UTCDateTime("2011-11-22T00")
st = client.get_waveforms('OZLLOC1', '*', '*', '*', t, t+20, merge=-1)

print(st)
return st

print语句给出“流中有0个跟踪:”

如您所见,我广泛地使用了通配符,以便在我的文件上形成一个大网,但是仍然没有任何内容被读入流(st variable)。有没有人有过使用obsby阅读SDS的经验,或者可以发现我的问题?在


Tags: 文件代码fromimporttkinterroot结构a3