我有一个带有单个通道跟踪的小型种子文件,我假设数据是计数的(我如何检查跟踪的单位?)。我需要将其转换为m/s。我已经检查了obspy教程,我的主要问题是我不知道如何访问miniseed文件中的极点、零点和放大因子。另外,我需要这个校准文件吗?
下面是我的代码:
from obspy.core import *
st=read('/Users/guilhermew/Documents/Projecto/Dados sismicos 1 dia/2012_130_DOC01.mseed')
st.plot()预先谢谢你,Guilherme
编辑:我终于明白了如何转换数据。Obspy有不同的方法来实现这一点,但归根结底,它都是从波形数据中删除仪器响应。就像@Robert Barsch所说的,我需要另一个文件来获取仪器响应元数据。所以我想出了下面的代码:
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)我正在使用seisSim函数来转换数据。我现在的问题是输出看起来不正确(但我似乎不能发布图像)
发布于 2013-05-02 00:32:07
这显然是一个应该向地震学社区而不是StackOverflow提出的问题!你写给ObsPy user mailinglist怎么样?
更新:我仍然认为答案是他/她应该直接在ObsPy邮件列表中询问。然而,为了对实际问题给出一个恰当的答案: MiniSEED是一种纯数据格式,它不包含任何元信息,如极点和零或使用的单位。因此,是的,您将需要另一个文件,如RESP,SAC PAZ,无数据种子,完整种子等,以获得工作站特定的元数据。要应用地震仪校正,请阅读http://docs.obspy.org/tutorial/code_snippets/seismometer_correction_simulation.html
发布于 2016-02-17 00:36:26
要获得真实的单位,而不是计数,您需要删除仪器响应。我使用以下代码删除仪器响应:
# 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个零)。
https://stackoverflow.com/questions/16071620
复制相似问题