ObsPy Tutorial
Exercise: Event Detection and Magnitude Estimation in an Aftershock Series
</div> </div> </div> image: User:Abbaszade656 / Wikimedia Commons / CC-BY-SA-4.0

Workshop for the "Training in Network Management Systems and Analytical Tools for Seismic"

Baku, October 2018

Seismo-Live: http://seismo-live.org


Exercise -- The 2008 Mt. Carmel, Illinois, Earthquake and Aftershock Series

Introduction from "The April 18, 2008 Illinois Earthquake: An ANSS Monitoring Success" by Robert B. Herrmann, Mitch Withers, and Harley Benz, SRL 2008:

"The largest-magnitude earthquake in the past 20 years struck near Mt. Carmel in southeastern Illinois on Friday morning, 18 April 2008 at 09:36:59 UTC (04:37 CDT). The Mw 5.2 earthquake was felt over an area that spanned Chicago and Atlanta, with about 40,000 reports submitted to the U.S. Geological Survey (USGS) “Did You Feel It?” system. There were at least six felt aftershocks greater than magnitude 3 and 20 aftershocks with magnitudes greater than 2 located by regional and national seismic networks. Portable instrumentation was deployed by researchers of the University of Memphis and Indiana University (the first portable station was installed at about 23:00 UTC on 18 April). The portable seismographs were deployed both to capture near-source, high-frequency ground motions for significant aftershocks and to better understand structure along the active fault. [...]"

World map Felt report map

Web page hits at USGS/NEIC during 24 hours after the earthquake:

  • peak rate: 3,892 hits/second
  • 68 million hits in the 24 hours after the earthquake

USGS/NEIC web page hits

Some links:

In [1]:
%matplotlib inline

Use the search on the ObsPy docs for any functionality that you do not remember/know yet..!

E.g. searching for "filter"...

1. Download and visualize main shock

Request information on stations recording close to the event from IRIS using the obspy.fdsn Client, print the requested station information.

In [2]:
from obspy import UTCDateTime
from obspy.clients.fdsn import Client

t = UTCDateTime(2008, 4, 18, 9, 36, 59)
lon = -87.89
lat = 38.45

client = Client("IRIS")
inventory = client.get_stations(
    starttime=t-100, endtime=t+100,
    longitude=lon, latitude=lat, maxradius=1,
Inventory created at 2019-11-04T08:56:59.000000Z
	Created by: IRIS WEB SERVICE: fdsnws-station | version: 1.1.37
	Sending institution: IRIS-DMC (IRIS-DMC)
		Networks (5):
			KY, NM, PN, SY, Z3
		Stations (60):
			KY.MOKY (Morganfield, Kentucky)
			NM.NHIN (New Harmony,IN)
			NM.OLIL (Olney Central College  Olney, IL)
			NM.USIN (Univ. of Southern Indiana, Evansville, IN)
			PN.PPPCH (Princeton Community High School, Princeton, IN, USA)
			SY.FFIL (FFIL synthetic)
			SY.OLIL (OLIL synthetic)
			SY.PPHHS (PPHHS synthetic)
			SY.PPPCH (PPPCH synthetic)
			SY.Q44A (Q44A synthetic)
			SY.Q44B (Q44B synthetic)
			SY.Q45A (Q45A synthetic)
			SY.Q46A (Q46A synthetic)
			SY.R44A (R44A synthetic)
			SY.R45A (R45A synthetic)
			SY.R46A (R46A synthetic)
			SY.S45A (S45A synthetic)
			SY.S46A (S46A synthetic)
			SY.USIN (USIN synthetic)
			SY.WB07 (WB07 synthetic)
			SY.WB08 (WB08 synthetic)
			SY.WB09 (WB09 synthetic)
			SY.WB11 (WB11 synthetic)
			SY.WB12 (WB12 synthetic)
			SY.WB13 (WB13 synthetic)
			SY.WB14 (WB14 synthetic)
			SY.WB15 (WB15 synthetic)
			SY.WB16 (WB16 synthetic)
			SY.WB17 (WB17 synthetic)
			SY.WB18 (WB18 synthetic)
			SY.WB19 (WB19 synthetic)
			SY.WB20 (WB20 synthetic)
			SY.WB21 (WB21 synthetic)
			SY.WB22 (WB22 synthetic)
			SY.WB23 (WB23 synthetic)
			SY.WB24 (WB24 synthetic)
			SY.WB25 (WB25 synthetic)
			SY.WB26 (WB26 synthetic)
			SY.WB28 (WB28 synthetic)
			SY.WB29 (WB29 synthetic)
			SY.WB30 (WB30 synthetic)
			SY.WB31 (WB31 synthetic)
			SY.WB32 (WB32 synthetic)
			SY.WB33 (WB33 synthetic)
			SY.WB34 (WB34 synthetic)
			SY.WB35 (WB35 synthetic)
			SY.WB36 (WB36 synthetic)
			SY.WB37 (WB37 synthetic)
			SY.WB38 (WB38 synthetic)
			SY.WB39 (WB39 synthetic)
			SY.WB40 (WB40 synthetic)
			SY.WB41 (WB41 synthetic)
			SY.WB46 (WB46 synthetic)
			SY.WB47 (WB47 synthetic)
			SY.WB48 (WB48 synthetic)
			SY.WB49 (WB49 synthetic)
			Z3.MC1 (near USGS Mainshock)
			Z3.MC2 (between Bellmont and Maud, IL)
			Z3.MC4 (near Browns, IL)
		Channels (0):

Download waveform data for the mainshock for one of the stations using the FDSN client (if you get an error, maybe try a different station and/or ask for help). Make the preview plot using obspy.

In [3]:
st = client.get_waveforms("NM", "USIN", "*", "HH*", t, t+50)

Visualize a Spectrogram (if you got time, you can play around with the different parameters for the spectrogram). Working on a copy of the donwloaded data, apply a filter, then trim the requested data to some interesting parts of the earthquake and plot the data again.

In [4]:
st.spectrogram(wlen=1.5, per_lap=0.9, mult=5, log=True)

st2 = st.copy()
st2.filter(type="bandpass", freqmin=1, freqmax=20)
st2.trim(t+3, t+25)

Define a function plot_data(t) that fetches waveform data for this station and that shows a preview plot of 20 seconds of data starting at a given time. It should take a UTCDateTime object as the single argument.

In [5]:
def plot_data(time):
    st = client.get_waveforms("NM", "USIN", "*", "HH*", time, time+20)

Test your function by calling it for the time of the main shock

In [6]: