本文整理汇总了Python中obspy.arclink.Client.getStations方法的典型用法代码示例。如果您正苦于以下问题:Python Client.getStations方法的具体用法?Python Client.getStations怎么用?Python Client.getStations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类obspy.arclink.Client
的用法示例。
在下文中一共展示了Client.getStations方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_getStations
# 需要导入模块: from obspy.arclink import Client [as 别名]
# 或者: from obspy.arclink.Client import getStations [as 别名]
def test_getStations(self):
"""
"""
# initialize client
client = Client(user='[email protected]')
# example 1
start = UTCDateTime(2008, 1, 1)
end = start + 1
result = client.getStations(start, end, 'BW')
self.assertTrue(
AttribDict({'remark': '', 'code': 'RWMO', 'elevation': 763.0,
'description': 'Wildenmoos, Bavaria',
'start': UTCDateTime(2006, 6, 4, 0, 0),
'restricted': False, 'archive_net': '',
'longitude': 12.729887, 'affiliation': '',
'depth': None, 'place': '', 'country': '',
'latitude': 47.744172, 'end': None}) in result)
示例2: assert
# 需要导入模块: from obspy.arclink import Client [as 别名]
# 或者: from obspy.arclink.Client import getStations [as 别名]
for trig in triglist:
closest_sta = trig['stations'][0]
tr = st.select(station=closest_sta)[0]
trig['latitude'] = tr.stats.coordinates.latitude
trig['longitude'] = tr.stats.coordinates.longitude
paz_wa = {'sensitivity': 2800, 'zeros': [0j], 'gain': 1,
'poles': [-6.2832-4.7124j, -6.2832+4.7124j]}
for trig in triglist:
t = trig['time']
print "#" * 80
print "Trigger time:", t
mags = []
stations = client.getStations(t, t + 300, "CH")
for station in stations:
station = station['code']
try:
st = client.getWaveform("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]