当前位置: 首页>>代码示例>>Python>>正文


Python Client.get_stations方法代码示例

本文整理汇总了Python中obspy.clients.arclink.Client.get_stations方法的典型用法代码示例。如果您正苦于以下问题:Python Client.get_stations方法的具体用法?Python Client.get_stations怎么用?Python Client.get_stations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在obspy.clients.arclink.Client的用法示例。


在下文中一共展示了Client.get_stations方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_get_stations

# 需要导入模块: from obspy.clients.arclink import Client [as 别名]
# 或者: from obspy.clients.arclink.Client import get_stations [as 别名]
 def test_get_stations(self):
     """
     """
     # initialize client
     client = Client(user='[email protected]')
     # example 1
     start = UTCDateTime(2008, 1, 1)
     end = start + 1
     result = client.get_stations(start, end, 'BW')
     self.assertTrue(
         AttribDict({'remark': '', 'code': 'RWMO', 'elevation': 763.0,
                     'description': 'Wildenmoos, Bavaria, BW-Net',
                     'start': UTCDateTime(2006, 7, 4, 0, 0),
                     'restricted': False, 'archive_net': '',
                     'longitude': 12.729887, 'affiliation': 'BayernNetz',
                     'depth': None, 'place': 'Wildenmoos',
                     'country': 'BW-Net', 'latitude': 47.744171,
                     'end': None}) in result)
     # example 2
     expected = AttribDict(
         {'code': 'WDD', 'description': 'Wied Dalam',
          'affiliation': '', 'country': '', 'place': '', 'remark': '',
          'restricted': False, 'archive_net': '',
          'latitude': 35.8373, 'longitude': 14.5242,
          'elevation': 44.0, 'depth': None,
          'start': UTCDateTime(1995, 7, 6, 0, 0), 'end': None})
     # routing default
     result = client.get_stations(start, end, 'MN')
     self.assertTrue(expected in result)
     # w/o routing
     result = client.get_stations(start, end, 'MN', route=False)
     self.assertTrue(expected in result)
     # w/ routing
     result = client.get_stations(start, end, 'MN', route=True)
     self.assertTrue(expected in result)
开发者ID:Brtle,项目名称:obspy,代码行数:37,代码来源:test_client.py

示例2: test_getStations

# 需要导入模块: from obspy.clients.arclink import Client [as 别名]
# 或者: from obspy.clients.arclink.Client import get_stations [as 别名]
 def test_getStations(self):
     """
     """
     # initialize client
     client = Client(user="[email protected]")
     # example 1
     start = UTCDateTime(2008, 1, 1)
     end = start + 1
     result = client.get_stations(start, end, "BW")
     self.assertTrue(
         AttribDict(
             {
                 "remark": "",
                 "code": "RWMO",
                 "elevation": 763.0,
                 "description": "Wildenmoos, Bavaria, BW-Net",
                 "start": UTCDateTime(2006, 7, 4, 0, 0),
                 "restricted": False,
                 "archive_net": "",
                 "longitude": 12.729887,
                 "affiliation": "BayernNetz",
                 "depth": None,
                 "place": "Wildenmoos",
                 "country": " BW-Net",
                 "latitude": 47.744171,
                 "end": None,
             }
         )
         in result
     )
开发者ID:yyuzhong,项目名称:obspy,代码行数:32,代码来源:test_client.py

示例3: test_get_stations_inconsistency

# 需要导入模块: from obspy.clients.arclink import Client [as 别名]
# 或者: from obspy.clients.arclink.Client import get_stations [as 别名]
 def test_get_stations_inconsistency(self):
     """
     """
     # initialize client
     client = Client(user='[email protected]')
     # example 1
     start = UTCDateTime(2008, 1, 1)
     end = start + 1
     result_origin = AttribDict(
         {'remark': '', 'code': 'RWMO', 'elevation': 763.0,
          'description': 'Wildenmoos, Bavaria, BW-Net',
          'start': UTCDateTime(2006, 7, 4, 0, 0),
          'restricted': False, 'archive_net': '',
          'longitude': 12.729887, 'affiliation': 'BayernNetz',
          'depth': None, 'place': 'Wildenmoos',
          'country': ' BW-Net', 'latitude': 47.744171,
          'end': None})
     # OK: from origin node
     result = client.get_stations(start, end, 'BW', route=True)
     self.assertTrue(result_origin in result)
     # BUT: this one from a different node was modified and fails
     result = client.get_stations(start, end, 'BW')
     self.assertTrue(result_origin in result)
开发者ID:Brtle,项目名称:obspy,代码行数:25,代码来源:test_client.py

示例4: test_get_stations

# 需要导入模块: from obspy.clients.arclink import Client [as 别名]
# 或者: from obspy.clients.arclink.Client import get_stations [as 别名]
 def test_get_stations(self):
     """
     """
     # initialize client
     client = Client(user='[email protected]')
     # example 1
     start = UTCDateTime(2008, 1, 1)
     end = start + 1
     result = client.get_stations(start, end, 'BW')
     self.assertTrue(
         AttribDict({'remark': '', 'code': 'RWMO', 'elevation': 763.0,
                     'description': 'Wildenmoos, Bavaria, BW-Net',
                     'start': UTCDateTime(2006, 7, 4, 0, 0),
                     'restricted': False, 'archive_net': '',
                     'longitude': 12.729887, 'affiliation': 'BayernNetz',
                     'depth': None, 'place': 'Wildenmoos',
                     'country': ' BW-Net', 'latitude': 47.744171,
                     'end': None}) in result)
开发者ID:Qigaoo,项目名称:obspy,代码行数:20,代码来源:test_client.py

示例5: Client

# 需要导入模块: from obspy.clients.arclink import Client [as 别名]
# 或者: from obspy.clients.arclink.Client import get_stations [as 别名]
from math import log10

import numpy as np

from obspy.clients.arclink import Client
from obspy import UTCDateTime
from obspy.geodetics import gps2dist_azimuth


paz_wa = {"sensitivity": 2800, "zeros": [0j], "gain": 1, "poles": [-6.2832 - 4.7124j, -6.2832 + 4.7124j]}

client = Client(user="[email protected]")
t = UTCDateTime("2012-04-03T02:45:03")

stations = client.get_stations(t, t + 300, "CH")
mags = []

for station in stations:
    station = station["code"]
    try:
        st = client.get_waveforms("CH", station, "", "[EH]H[ZNE]", t - 300, t + 300, metadata=True)
        assert len(st) == 3
    except:
        print(station, "---")
        continue

    st.simulate(paz_remove="self", paz_simulate=paz_wa, water_level=10)
    st.trim(t, t + 50)

    tr_n = st.select(component="N")[0]
开发者ID:jshridha,项目名称:obspy,代码行数:32,代码来源:advanced_exercise_solution_4c.py


注:本文中的obspy.clients.arclink.Client.get_stations方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。