SAC Tutorial Seven

7.1 Convolution

In today's activity we will examine some ways to adjust seismic time series. The first approach is to use convolution to combine information from two time series. Since convolution is a new concept, it would be good to examine it's effect on a very basic level. Fortunately, SAC has a convolve function to allow us to examine the effects. To begin this activity, let's login to the linux server with our VNC viewer, and then move into the directory called source that we used in our last activity since we will use some of the data seismograms again. Go ahead and start sac, and then use the funcgen command to generate a simple boxcar time series to begin with.

[username@linux source] sac

SAC> funcgen boxcar npts 30 delta 1
SAC> p

This command produces a time series that has a value of 0 from 0-10 s, value of 1 from 11-20, and value of 0 from 21 to 29. The time series has 30 points with 1 sample point per second. To make things simple, let's convolve this boxcar funciton with itself to see what convolution will produce when two boxcar functions are convolved:

SAC> convolve
SAC> p

You should see the convolution results are a triangle function.

Exercise 7.1

Please explain why the convolution of two boxcar time series produces a traingle shape. Also explain why the peak of the triangle has a value of 10. Store the answers to these questions in a file called convolve.txt.

7.2 Cross-Correlation

Next we will use the cross-correlation approach to examine and adjust seismi time series. We will be using cross-correlation to examine time offsets between similar signals. This is a very useful application when trying to get the best arrival time pick for a set of seismic waves. As you may recall, the arrival time picks of P and S waves are used to determine earthquake locations and earth velocity structure, so making the picks as precise as possible will ensure the locations and velocity structure are as accurate as possible. In our previous SAC tutorial, we looked at several recordings of a 2007 Sumatra earthquake to examine the variations in the source time function over different aziumths. I had made the arrival time picks for you in that case, but I just made those picks by eye, so cross-correlation should be able to improve upon those estimated arrival time picks.

For the first example, we will compare the time series from stations ULN and MAJO, which are roughly north of the earthquake. To make the cross-correlation results easy to interpret, we're going to trim down each time series to 20 seconds total, with 10 seconds before the arrival time pick (T1) and 10 seconds after.

SAC> cut t1 -10 10
SAC> r *ULN*SAC *MAJO*SAC
SAC> p1 rel

By eye, you should see that these time series seem to be well aligned. Now let's do the cross-correlation to see how well aligned they are quantitatively.

SAC> correlate
SAC> picks off
SAC> p1 rel

The top plot shows the "autocorrelation", which is the correlation of the ULN time series with itself. The bottom plot shows the correlation of the ULN time series with the MAJO time series. I had you turn the pick markings off (picks off), just so they don't get in the way of looking at the time series. You should find that the cross-correlation shows a time series that looks very similar to the autocorrelation, which means that the MAJO time series is very similar to the ULN time series. In particular, the peak of the bottom plot is almost exactly at the same time as the top plot (10 seconds), meaning that the time picks are precise (they mark very similar times between the two time series). So in this case, my qualitative pick by eye was as good as the quantitative one.

For the second example, let's compare station ULN with TARA, slightly further to the east. After we read these files into SAC, we have to make a slight adjustment to the sampling rate, because station TARA has a delta t of .025 instead of .05. We can correct for this with the interpolate function to adjust the sampling rate to be common for all time series.

SAC> r *ULN*SAC *TARA*SAC
SAC> interpolate delta .05
SAC> p1 rel

You may notice that in this zoomed in view the time series appear to be off a bit. It may not seem like much, but you should go ahead and do the correlation and then examine how offset the bottom plot is from the top plot to determine how offset the original two time series are.

Exercise 7.2

How many seconds offset are the two time series? Which one is earlier than the other? Since we know that the arrival times are used to calculate earthquake locations, how big off an offset in the earthquake location could we get from an incorrect offset in the arrival time? Let's assume that an average velocity for P wave arrivals is 10 km/s, and use our favorite equation velocity = distance / time. Store the answers to these questions in a file called correlate.txt.

Summary

convolve sac command that convolves the first times series with all those read into sac.
correlate sac command that correlates the first times series with all those read into sac.
interpolate delta value sac command that adjusts sampling rate of all seismograms to a delta t of value.
cut time begin end sac command that will cut all future files read from time minus begin to time plus end.
picks off sac command that hides the time picks when plotting.

 

brudzimr@muohio.edu, 25th October 2007