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


Python Client.resp方法代碼示例

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


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

示例1: test_resp

# 需要導入模塊: from obspy.iris import Client [as 別名]
# 或者: from obspy.iris.Client import resp [as 別名]
    def test_resp(self):
        """
        Tests resp Web service interface.

        Examples are inspired by http://www.iris.edu/ws/resp/.
        """
        client = Client()
        # 1
        t1 = UTCDateTime("2005-001T00:00:00")
        t2 = UTCDateTime("2008-001T00:00:00")
        result = client.resp("IU", "ANMO", "00", "BHZ", t1, t2)
        self.assertTrue("B050F03     Station:     ANMO" in result)
        # 2 - empty location code
        result = client.resp("UW", "LON", "", "EHZ")
        self.assertTrue("B050F03     Station:     LON" in result)
        self.assertTrue("B052F03     Location:    ??" in result)
        # 3 - empty location code via '--'
        result = client.resp("UW", "LON", "--", "EHZ")
        self.assertTrue("B050F03     Station:     LON" in result)
        self.assertTrue("B052F03     Location:    ??" in result)
        # 4
        dt = UTCDateTime("2010-02-27T06:30:00.000")
        result = client.resp("IU", "ANMO", "*", "*", dt)
        self.assertTrue("B050F03     Station:     ANMO" in result)
開發者ID:egdorf,項目名稱:obspy,代碼行數:26,代碼來源:test_client.py

示例2: UTCDateTime

# 需要導入模塊: from obspy.iris import Client [as 別名]
# 或者: from obspy.iris.Client import resp [as 別名]
# 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 FDSN web service into a ObsPy stream object
fdsn_client = FDSN_Client("IRIS")
st = fdsn_client.get_waveforms('NZ', 'BFZ', '10', 'HHZ', t1, t2)

# Download and save instrument response file into a temporary file
with NamedTemporaryFile() as tf:
    respf = tf.name
    old_iris_client = OldIris_Client()
    # fetch RESP information from "old" IRIS web service, see obspy.fdsn
    # for accessing the new IRIS FDSN web services
    old_iris_client.resp('NZ', 'BFZ', '10', 'HHZ', t1, t2, filename=respf)

    # 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
                # also be omitted, and the starttime of the trace is then used.
                'date': date,
開發者ID:farmbao,項目名稱:obspy,代碼行數:32,代碼來源:seismometer_correction_simulation_3.py


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