3

I have a miniseed file with a singlechannel trace and I assume the data is in counts (how can i check the units of the trace?). I need to transform this in to m/s. I already checked the obspy tutorial and my main problem is that i dont know how to access the poles and zeros and amplification factor from the miniseed file. Also, do I need the calibration file for this?

Here is my code:

from obspy.core import *
st=read('/Users/guilhermew/Documents/Projecto/Dados sismicos 1 dia/2012_130_DOC01.mseed')
st.plot()

Thanks in advance, Guilherme

EDIT: I finally understood how to convert the data. Obspy has different ways to achieve this, but it all comes down to removing the instrument response from the waveform data. Like @Robert Barsch said, I needed another file to get the instrument response metadata. So I came up with the following code:

parser=Parser("dir/parser/file")
for tr in stream_aux:
    stream_id=tr.stats.network+'.'+tr.stats.station+ '..' + tr.stats.channel
    paz=parser.getPAZ(stream_id, tr.stats.starttime)
    df = tr.stats.sampling_rate
    tr.data = seisSim(tr.data, df, paz_remove=paz)

Im using the seisSim function to convert the data. My problem now is that the output dosen't look right (but i cant seem to post the image)

4

2 回答 2

2

这显然是应该向地震学界而不是 StackOverflow 提出的问题!你写信给ObsPy 用户邮件列表怎么样?

更新:我仍然觉得答案是他/她应该直接在 ObsPy 邮件列表中询问。但是,为了对实际问题给出正确答案:MiniSEED 是一种纯数据格式,不包含任何元信息,例如极点和零点或使用的单位。所以是的,您将需要另一个文件,例如 RESP、SAC PAZ、Dataless SEED、Full SEED 等,以获取站点特定的元数据。要应用您的地震仪校正,请阅读http://docs.obspy.org/tutorial/code_snippets/seismometer_correction_simulation.html

于 2013-05-01T16:32:06.543 回答
1

要获得真实单位而不是计数,您需要删除仪器响应。我使用以下代码删除仪器响应:

# Define math defaults
from __future__ import division #allows real devision without rounding

# Retrieve modules needed
from obspy.core import read
import numpy as np
import matplotlib.pyplot as plt

#%% Choose and import data
str1 = read(fileloc)
print(str1) #show imported data
print(str1[0].stats) #show stats for trace

#%% Remove instrument response

# create dictionary of poles and zeros
TrillC = {'gain': 800.0,
        'poles': [complex(-3.691000e-02,3.712000e-02),
                  complex(-3.691000e-02,-3.712000e-02),
                  complex(-3.739000e+02,4.755000e+02),
                  complex(-3.739000e+02,-4.755000e+02),
                  complex(-5.884000e+02,1.508000e+03),
                  complex(-5.884000e+02,-1.508000e+03)],
        'sensitivity': 8.184000E+11,
        'zeros': [0 -4.341E+02]}
str1_remres = str1.copy() #make a copy of data, so original isn't changed
str1_remres.simulate(paz_remove=TrillC, paz_simulate=None, water_level=60.0)
print("Instrument Response Removed")

plt.figure()
str1_remres_m = str1_remres.merge()
plt.plot(str1_remres_m[0].data) #only will plot first trace of the stream

如您所见,我已经手动定义了极点和零点。可能有一种方法可以自动输入它,但这是我发现的有效方式。

请记住,每种仪器都有不同的极点和零点。

您使用的零的数量取决于您希望输出的内容。地震仪通常是速度(2 个零)

  • 3 个零 = 位移
  • 2 个零 = 速度
  • 1 零 = 加速度
于 2016-02-16T16:36:25.987 回答