コード例 #1
0
ファイル: test_client.py プロジェクト: celso-iris/obspy
 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)
コード例 #2
0
ファイル: test_client.py プロジェクト: Ciack404/obspy
 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)
コード例 #3
0
ファイル: test_client.py プロジェクト: egdorf/obspy
 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)
コード例 #4
0
ファイル: test_client.py プロジェクト: msimon00/obspy
 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)
コード例 #5
0
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
コード例 #6
0
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()

コード例 #7
0
print st
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()