當前位置: 首頁>>代碼示例>>Python>>正文


Python Client.getWaveform方法代碼示例

本文整理匯總了Python中obspy.iris.Client.getWaveform方法的典型用法代碼示例。如果您正苦於以下問題:Python Client.getWaveform方法的具體用法?Python Client.getWaveform怎麽用?Python Client.getWaveform使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在obspy.iris.Client的用法示例。


在下文中一共展示了Client.getWaveform方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_issue623

# 需要導入模塊: from obspy.iris import Client [as 別名]
# 或者: from obspy.iris.Client import getWaveform [as 別名]
 def test_issue623(self):
     """
     obspy.iris bulkdataselect only returns last trace in result
     """
     t1 = UTCDateTime("2011-03-11T06:31:30Z")
     t2 = UTCDateTime("2011-03-11T06:48:00Z")
     client = Client()
     st = client.getWaveform("GE", "EIL", "", "BHZ", t1, t2)
     self.assertEqual(len(st), 5)
開發者ID:Ciack404,項目名稱:obspy,代碼行數:11,代碼來源:test_client.py

示例2: test_getWaveform

# 需要導入模塊: from obspy.iris import Client [as 別名]
# 或者: from obspy.iris.Client import getWaveform [as 別名]
 def test_getWaveform(self):
     """
     Testing simple waveform request method.
     """
     # simple example
     client = Client()
     start = UTCDateTime("2010-02-27T06:30:00.019538Z")
     end = start + 20
     stream = client.getWaveform("IU", "ANMO", "00", "BHZ", start, end)
     self.assertEquals(len(stream), 1)
     self.assertEquals(stream[0].stats.starttime, start)
     self.assertEquals(stream[0].stats.endtime, end)
     self.assertEquals(stream[0].stats.network, "IU")
     self.assertEquals(stream[0].stats.station, "ANMO")
     self.assertEquals(stream[0].stats.location, "00")
     self.assertEquals(stream[0].stats.channel, "BHZ")
     # no data raises an exception
     self.assertRaises(Exception, client.getWaveform, "YY", "XXXX", "00", "BHZ", start, end)
開發者ID:egdorf,項目名稱:obspy,代碼行數:20,代碼來源:test_client.py

示例3: UTCDateTime

# 需要導入模塊: from obspy.iris import Client [as 別名]
# 或者: from obspy.iris.Client import getWaveform [as 別名]
from obspy.iris import Client
from obspy.core import UTCDateTime
from obspy.core.util import NamedTemporaryFile
import matplotlib.pyplot as plt
import numpy as np

# MW 7.1 Darfield earthquake, New Zealand
t1 = UTCDateTime("2010-09-3T16:30:00.000")
t2 = UTCDateTime("2010-09-3T17:00:00.000")

# Fetch waveform from IRIS web service into a ObsPy stream object
client = Client()
st = client.getWaveform('NZ', 'BFZ', '10', 'HHZ', t1, t2)

# Download and save instrument response file into a temporary file
with NamedTemporaryFile() as tf:
    respf = tf.name
    client.saveResponse(respf, 'NZ', 'BFZ', '10', 'HHZ', t1, t2, format="RESP")

    # make a copy to keep our original data
    st_orig = st.copy()

    # define a filter band to prevent amplifying noise during the deconvolution
    pre_filt = (0.005, 0.006, 30.0, 35.0)

    # this can be the date of your raw data or any date for which the
    # SEED RESP-file is valid
    date = t1

    seedresp = {'filename': respf,  # RESP filename
                # when using Trace/Stream.simulate() the "date" parameter can
開發者ID:Ciack404,項目名稱:obspy,代碼行數:33,代碼來源:seismometer_correction_simulation_3.py

示例4: print

# 需要導入模塊: from obspy.iris import Client [as 別名]
# 或者: from obspy.iris.Client import getWaveform [as 別名]
print (st[0].stats)
st.write('REF.EHZ.2009:082.mseed', format='MSEED')
#st.write('REF.EHZ.2009:082.wave', format='WAV', framerate=6000)
st.write('REF.EHZ.2009:082.sac', format='SAC')

# This needs basemap and demonstrates the event and catalog classes
from obspy.core.event import *
cat = readEvents(\
"http://www.seismicportal.eu/services/event/search?magMin=8.0")
cat.plot()



# IRIS DMC example
from obspy.iris import Client
from obspy.core import UTCDateTime
client = Client()
t = UTCDateTime("2012-08-05T06:00:00.000")
st = client.getWaveform('IU', 'ANMO', '00', 'BHZ', t, t + 300)
st.plot()

# Earthworm wave server example - connection is refused though
from obspy.earthworm import Client
client = Client("pele.ess.washington.edu", 16017)
response = client.availability("UW", "TUCA", channel="BHZ")
print response
t = response[0][4]
st = client.getWaveform('UW', 'TUCA', '', 'BH*', t + 100, t + 130)
st.plot()

開發者ID:gthompson,項目名稱:python_gt,代碼行數:31,代碼來源:obspy_miniseed_example_1.py


注:本文中的obspy.iris.Client.getWaveform方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。