Obspy,从SDS文件结构中读取文件

时间:2016-04-20 03:17:29

标签: python structure

我正在使用obspy模块将迷你文件从本地SDS文件结构读取到obspy流对象中。我根据SeisComP formatting instructions将我的文件组织成本地SDS文件结构,初始化obspy client并使用client.get_waveforms函数,但返回的流对象为空。对于处理文件导入的代码部分,我在python中没有收到任何错误。

以下是我的文件结构示例,它代表YEAR-2011,Day-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语句在Stream中提供" 0 Trace("

正如您所看到的,我已广泛使用通配符,以便在我的文件上投放一个宽网,但仍然没有任何内容被读入流(st变量)。有没有人对SDS的阅读有亵渎的经验,或者能发现我的问题?

1 个答案:

答案 0 :(得分:1)

SDS结构没有.msd个文件结尾。

无论出于何种原因,我都无法在此答案中发布多个链接,因此请查看我们的github问题跟踪器的所有详细信息,无论如何这是ObsPy相关问题的正确位置:https://github.com/obspy/obspy/issues/1378

相关问题