/
__init__.py
52 lines (44 loc) · 1.79 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- coding: utf-8 -*-
"""
obspy.clients.earthworm - Earthworm Wave Server client for ObsPy.
=================================================================
:copyright:
The ObsPy Development Team (devs@obspy.org) & Victor Kress
:license:
GNU Lesser General Public License, Version 3
(https://www.gnu.org/copyleft/lesser.html)
Basic Usage
-----------
(1) :meth:`~obspy.clients.earthworm.client.Client.getWaveform()`: The following
example illustrates how to request and plot 30 seconds of all three
short period channels (``"EH*"``) of station ``"ACH"`` of the `Alaska
Volcano Observatory <https://www.avo.alaska.edu/>`_ (``"AV"``).
>>> from obspy.clients.earthworm import Client
>>> client = Client("pubavo1.wr.usgs.gov", 16022)
>>> response = client.get_availability('AV', 'ACH', channel='BHE')
>>> print(response) # doctest: +SKIP
[('AV',
'ACH',
'--',
'BHE',
UTCDateTime(2015, 1, 22, 7, 26, 32, 679000),
UTCDateTime(2015, 3, 23, 7, 26, 29, 919966)]
>>> t = response[0][4]
>>> st = client.get_waveforms('AV', 'ACH', '', 'BH*', t + 100, t + 130)
>>> st.plot() # doctest: +SKIP
.. plot::
from obspy.clients.earthworm import Client
from obspy import UTCDateTime
client = Client("pubavo1.wr.usgs.gov", 16022, timeout=5)
response = client.get_availability('AV', 'ACH', channel='EHE')
t = response[0][4]
st = client.get_waveforms('AV', 'ACH', '', 'BH*', t + 100, t + 130)
st.plot()
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from future.builtins import * # NOQA
from obspy.clients.earthworm.client import Client # NOQA
if __name__ == '__main__':
import doctest
doctest.testmod(exclude_empty=True)