Пример #1
0
def combine_events():
    events = Events.read('/home/richter/Data/events/NEIC90-10_mag5.5.txt',
                         regex=Events.regex_NEIC2)
    events.pick(before='2000-01-01')
    events += Events.read('/home/richter/Data/events/events00-11_mag5.txt')
    events.pick(bigger=5.5)
    events.write('/home/richter/Data/events/events90-11_mag5.5.txt')
Пример #2
0
def compare_events():
    events = Events.read('/home/richter/Data/events/NEIC90-10_mag5.5.txt', regex=Events.regex_NEIC2)
    events.pick(after='2009-12-01', before='2010-05-01', bigger=5.5)
    events2 = Events.read('/home/richter/Data/events/events00-11_mag5.txt')
    events2.pick(after='2009-12-01', before='2010-05-01', bigger=5.5)
    print (events)
    print (events2)
    from IPython import embed
    embed()
Пример #3
0
def compare_events():
    events = Events.read('/home/richter/Data/events/NEIC90-10_mag5.5.txt',
                         regex=Events.regex_NEIC2)
    events.pick(after='2009-12-01', before='2010-05-01', bigger=5.5)
    events2 = Events.read('/home/richter/Data/events/events00-11_mag5.txt')
    events2.pick(after='2009-12-01', before='2010-05-01', bigger=5.5)
    print(events)
    print(events2)
    from IPython import embed
    embed()
Пример #4
0
 def setUp(self):
     self.path = os.path.dirname(__file__)
     self.eventfile = os.path.join(self.path, 'data_temp', 'event_list.txt')
     self.eventfile2 = os.path.join(self.path, 'data', 'NEIC_test.txt')
     try:
         self.events = Events.read(self.eventfile)
     except IOError:
         print ('Load events froms server...')
         self.events = Events.load(min_datetime='2010-1-1', max_datetime='2011-1-1', min_magnitude=7.0)
         self.events.write(self.eventfile)
Пример #5
0
def pick_rf_events(coords, after, bigger=5.5, label='temp'):
    print 'read events'
    events = Events.read('/home/richter/Data/events/2012_03_02_NEIC90-12-2_mag5.5.text', regex=Events.regex_NEIC2)
    print 'pick events'
    picked1 = events.pick(latitude=coords.latitude, longitude=coords.longitude, minval=27, maxval=93, after=after, bigger=bigger, replace=False)
    print 'write events'
    picked1.write('/home/richter/Data/events/events_27-93_mag5.5_%s.txt' % label)
Пример #6
0
def plot_events(coords):
    events = Events.read(
        '/home/richter/Data/events/events_30-90_mag5.8_IPOC.txt')
    events.plot(coords.latitude,
                coords.longitude,
                bigmap=False,
                circles=(30, 90, 150))
Пример #7
0
def pick_rf_events(coords, after, bigger=5.5, label='temp'):
    print 'read events'
    events = Events.read(
        '/home/richter/Data/events/2012_03_02_NEIC90-12-2_mag5.5.text',
        regex=Events.regex_NEIC2)
    print 'pick events'
    picked1 = events.pick(latitude=coords.latitude,
                          longitude=coords.longitude,
                          minval=27,
                          maxval=93,
                          after=after,
                          bigger=bigger,
                          replace=False)
    print 'write events'
    picked1.write('/home/richter/Data/events/events_27-93_mag5.5_%s.txt' %
                  label)
Пример #8
0
def pick_events():
    events = Events.read('/home/richter/Data/events/events00-11_mag5.5.txt')
    events.pick(bigger=5.5)  #after='2009-12-01', before='2009-12-10',
    events.write('/home/richter/Data/events/events06-11_mag5.5_IPOC.txt')
Пример #9
0
def load_events():
    events = Events.load(min_datetime='2000-01-01',
                         min_magnitude=5,
                         max_results=100000)
    events.write('/home/richter/Data/events/events00-11_mag5.txt')
Пример #10
0
 def test_events_IO(self):
     eventfile3 = os.path.join(self.path, 'temp', 'test_events_IO.txt')
     self.events[:3].write(eventfile3)
     events2 = Events.read(eventfile3)
     self.assertEqual(len(events2), 3)
Пример #11
0
def combine_events():
    events = Events.read('/home/richter/Data/events/NEIC90-10_mag5.5.txt', regex=Events.regex_NEIC2)
    events.pick(before='2000-01-01')
    events += Events.read('/home/richter/Data/events/events00-11_mag5.txt')
    events.pick(bigger=5.5)
    events.write('/home/richter/Data/events/events90-11_mag5.5.txt')
Пример #12
0
from sito.data import IPOC
from obspy.core import UTCDateTime as UTC
import matplotlib.pyplot as plt
import logging
logging.basicConfig()

lat_Toc = -22.170
lon_Toc = -69.971

#events = Events.load(min_datetime="2007-01-01", max_datetime="2008-12-31",
#                     min_latitude=lat_Toc - 1, max_latitude=lat_Toc + 1,
#                     min_longitude=lon_Toc - 1., max_longitude=lon_Toc + 1,
#                     max_results=1000000,
#                     min_magnitude=None, max_magnitude=None)
#events.write('/home/richter/Data/events/events_Tocopilla.txt')
events = Events.read('/home/richter/Data/events/events_Tocopilla.txt')
events.pick(latitude=lat_Toc, longitude=lon_Toc, minval=0, maxval=100., indegree=False)
#events.plot(lat_Toc, lon_Toc, circles=(1,))

method = 'filter2-20_1bit'
#method = 'filter0.005_1bit'

data = IPOC(xcorr_append='/Tocopilla/' + method, use_local_LVC=True)

t1 = UTC('2007-11-01')
t2 = UTC('2007-12-01')

period = 1800
correlation = ('PB03Z', 'PB03Z')
stream = data.readX(correlation, t1, t2, period=period)
#stream.filter2(2, 20)
Пример #13
0
from obspy.core import UTCDateTime as UTC
import matplotlib.pyplot as plt
import logging

logging.basicConfig()

lat_Toc = -22.170
lon_Toc = -69.971

#events = Events.load(min_datetime="2007-01-01", max_datetime="2008-12-31",
#                     min_latitude=lat_Toc - 1, max_latitude=lat_Toc + 1,
#                     min_longitude=lon_Toc - 1., max_longitude=lon_Toc + 1,
#                     max_results=1000000,
#                     min_magnitude=None, max_magnitude=None)
#events.write('/home/richter/Data/events/events_Tocopilla.txt')
events = Events.read('/home/richter/Data/events/events_Tocopilla.txt')
events.pick(latitude=lat_Toc,
            longitude=lon_Toc,
            minval=0,
            maxval=100.,
            indegree=False)
#events.plot(lat_Toc, lon_Toc, circles=(1,))

method = 'filter2-20_1bit'
#method = 'filter0.005_1bit'

data = IPOC(xcorr_append='/Tocopilla/' + method, use_local_LVC=True)

t1 = UTC('2007-11-01')
t2 = UTC('2007-12-01')
Пример #14
0
def plot_events(coords):
    events = Events.read('/home/richter/Data/events/events_30-90_mag5.8_IPOC.txt')
    events.plot(coords.latitude, coords.longitude, bigmap=False, circles=(30, 90, 150))
Пример #15
0
def pick_events():
    events = Events.read('/home/richter/Data/events/events00-11_mag5.5.txt')
    events.pick(bigger=5.5) #after='2009-12-01', before='2009-12-10',
    events.write('/home/richter/Data/events/events06-11_mag5.5_IPOC.txt')
Пример #16
0
 def test_events_read_NEIC(self):
     events3 = Events.read(self.eventfile2, regex=Events.regex_NEIC)
     events4 = Events.read(self.eventfile2, regex=Events.regex_NEIC2)
     self.assertEqual(len(events3), len(events4))
Пример #17
0
def load_events():
    events = Events.load(min_datetime='2000-01-01', min_magnitude=5, max_results=100000)
    events.write('/home/richter/Data/events/events00-11_mag5.txt')