You are on page 1of 1

Lab 4: Data Analysis with Matlab

Loading SAC data


Create a directory called matlab in your home directory (/gaia/ home /name). Copy
read_mulsac.m, loadsac.m and sac.m from

/gaia/home/hdeshon/ESCI7205/Bolivia/matlab

to this new directory. Open matlab and add this directory to your path.

cd into your ESCI7205 directory and create a new subdirectory for this lab. We are
going to copy a local New Madrid earthquake to this new directory. New Madrid
local earthquakes are stored at /gaia/data/seisnet/NM/YEAR/LOC. Choose an
earthquake from 2010 and copy only the EHZ files. Create a file named ‘listfile’ that
contains a list of all of the SAC files

From the command window or a script, use read_mulsac to read in your SAC files. If
you receive on error, just remove that file from the filelist.
a) Plot the first waveform, label the axes.
b) Replot the waveform using time as the x-axis rather than samples.

Exploring filters

Create a new variable ‘practice’ that contains one waveform. Make sure this
waveform does not exhibit gain-ranging, which will look like the waveform is
suddenly composed of zeros for a short period of time. Truncate this waveform so
that it primarily contains the earthquake and is 7000 points in length.

Copy the bandpass.m file from /gaia/home/hdeshon/ESCI7205/Bolivia/matlab


to your ~/matlab directory.

Use bandpass to filter your waveform ‘practice’ using a variety of high and low
corner frequencies. Plot each successive filtered waveform in a new window. Make
sure you understand how the bandpass filter works.

Copy one of your teleseismic waveforms from your lab2 directory. Test some of the
same bandpass corner frequencies you used with the local earthquake. Would you
use the same filter parameters for a local earthquake and a teleseismic earthquake?
What are some good filtering parameters to highlight the teleseismic body waves?
And to highlight the teleseismic surface waves?

Modifying filters

Modify bandpass.m to create a low pass Butterworth filter of order 2 and a high pass
Butterworth filter of order 2.

You might also like