Modern Seismology:

Seismic instruments, Data Processing, Data analysis

 

Matlab Practicals

H. Igel, 2009

 

Scope: The goal of these practical exercise is to learn the Matlab programming language and use it to analyse and visualise seismic data. The exercises and scripts can be followed sequentially depending on your experience with Matlab.

 

 

Class 1: Getting started.  (-> Getting started)

 

Familiarize yourself with the Matlab program. Note the excellent “Help” facilities.  Use “help command” to find out information on specific commands. Download and run the script “my_first_program.m” with Matlab.

 

Exercise: Write a new matlab program (e.g., myprogram.m) that (1) initializes a time series with dt=0.01 seconds sampling interval and 2s overall length. Superimpose several sin functions of various frequencies and plot the function. (2) Create a synthetic 2D topography model in a domain 100 km x 100 km, superimposing several Gauss functions of various halfwidth and height. (you can use random numbers to define those values).

 

Class 2: Calculating and displaying spectra of seismograms (-> Spectrum)

 

Load observed seismograms and display there amplitude and phase spectrum.

 

Exercise: Run the script “sumatra_longperiod.m” . Do you see any evidence for the excitation of the Earth’s eigenvibrations? Now let us look at the frequency content of the Sumatra main shock as recorded in Germany, with various instruments. Run the script “sumatra_mainshock.m” and display the data. Now use the subprograms from the long-period script to visualise the spectrum of the transverse motion (Tdata). The amplitudes are given in m/s. Integrate the transverse velocity, display the data and estimate the ground displacement in m as a consequence of the Sumatra earthquake. Estimate the dominant period with which this motion took place. Why did nobody feel it? Why are there problems with the integration. How could we fix it?

 

Exercise: Use the result from exercise 1 and add a section to the program that calculates and visualises the spectra of you 1D synthetic traces.

 

Class 3: Applying low-, high-, and bandpass filters (-> Filter)

 

Load transverse component of Sumatra event, apply filters and display them. Run program “sumatra_filter.m”.  Inspect the … pass.m programs and understand the filter generation program (butterworth filter). Play around with the order of the filtering and the filter causality (filt vs filtflit).

 

Exercise: Replace the seismic trace by a spike (Deltafunction), a Gaussian, or other function, apply the various filters and observe the effects on the waveforms.

 

Class 4: Applying and understanding convolutions (-> Convolution)

 

Run the program “myconvolution.m” that uses the intrinsic function “conv.m” to perform the convolution.

 

Exercise: Knowing that the convolution is a multiplication in the spectral domain, use the intrinsic functions fft and ifft to perform the convolution “by hand”. Verify by comparing with the original script that you obtain the same result.

 

Exercise (takes some time): Write a program that calculates the Green’s function for the response of a layered model to vertically travelling P waves that are reflected/transmitted only once per interface. Take into account the reflection, transmission coefficients. Finally, convolve the Green’s function with appropriate source functions and display the results.