SAC Tutorial Four

4.1 Time-Domain vs. Frequency Domain

Since seismograms can be a complex time series, we use many different kinds of techniques to analyze the signals. One common technique is frequency analysis, sometimes called Fourier Analysis. This involves looking at the signals in terms of their frequency content. To help give you an introduction to frequency analysis, I found a small set of tutorials about time and frequency represenation. It starts on Tutorial 2 (you don't need to read Tutorial 1 unless you're interested in the mathematical representation of the Fourier Analysis), and you can click the right arrow at the bottom of each page to continue reading through Tutorials 3, 4, and 5. You can return here after reading through them.

4.2 Frequency Analysis in SAC

Now we can start to use SAC to do some frequency analysis. In SAC, you can generate a time series with a sine function of 2 Hz over 2 seconds of time with the FUNCGEN command we used earlier. Plot it to make sure it looks ok. Then you can perform the fast-fourier transform using the FFT command. Now that the time series is converted to the frequency domain, the regular PLOT command will not work. Instead, you should use the PLOTSP to plot the frequency spectrum (abbreviation PSP). For right now, we can use the AM and LOGLIN options to just plot the amplitude part of the frequency component and do a logarithmic X-axis and linear Y-axis.

[username@linux ~] sac

SAC> FG SINE 2 NPTS 200 DELTA .01
SAC> P
SAC> FFT
SAC> PLOTSP AM LOGLIN

We can do the same type of frequency analysis with a impulse function too. Before you do it though, think about what the frequency domain plot will look like for an impulse function.

SAC> FG IMPULSE NPTS 100 DELTA .1
SAC> P
SAC> FFT
SAC> PSP AM LOGLIN

Exercise 4.1

What does the plot look like? How does the plot compare to your expectations? Why does it look different from the frequency plot for the sine wave? Store your answers in a file called freq.txt.

4.3 Filtering

Now we can try filtering the data in the frequency domain to change how the signal looks in the time domain. One of the ways to do that in SAC is with the BANDPASS command. This command applies a bandpass filter to the data currently in memory. Bandpass refers to the fact that we will allow a band of frequencies to "pass" through the filter, while other frequencies will be rejected. The edges of the frequency band are identified with the CORNER option.

SAC> FG IMPULSE NPTS 100 DELTA .1
SAC> P
SAC> BANDPASS CORNER .1 .3
SAC> P

Take a close look at how the signal has changed after filtering. Now let's look at the changes in the frequency domain.

SAC> FFT
SAC> PSP AM LOGLIN

Exercise 4.2

How does the filtered signal look different in the time domain? How does the filtered signal look different in the frequency domain? How might we use filtering in seismology to change our time domain signals?

Summary

FFT Performs a discrete Fourier transform.
PLOTSP Plots spectral data in several different formats.
BANDPASS Applies a bandpass filter.

 

brudzimr@muohio.edu, 19th August 2006