ESCI 7205 Data Analysis in Geophysics

MWF 9:10-10:05 AM

CERI Long Building Seminar Room or House 3 Unix Lab

Website: https://umdrive.memphis.edu/hdeshon/www/DataAnalysis/Syllabus_Fall2010.htm

 

Instructor: Heather DeShon

Office Hours: 4-5 PM Mondays, Wednesdays

 

Course Description

The course provides an overview of common tools used by geoscientists. Homework assignments are designed so that students can acquire a working knowledge of a wide range of scientific programming and scripting languages.  Emphasis is placed on manipulation and analysis of geophysical data in a Unix/Linux environment. Topics will include Unix, programming in MATLAB¨,  scripting (sh and csh), AWK, Seismic Analysis Code (SAC), Generic Mapping Tools (GMT) and Adobe Illustrator, and an overview of Fortran and C. The course will include hands on experience on the CERI comptuer system.

 

Texts:

Unix and Linux Visual Quickstart Guide, fourth addition, D.S. Ray and E.J. Ray

 

UoM is licensed to access many Unix/Linux books online through safaribooksonline.

We will be taking advantage of the following web material:

         Classic Shell Scripting, Nelson H.F. Beebe; Arnold Robbins

         Awk Article 1

         Awk Article 2

         Awk Article 3

                               Generic Mapping Tools (GMT )
                      
Seismic Analysis Code (SAC)
                      
Getting Started with Matlab 7 (pdf) or (html)

 

Course Requirements

Students must attend all lectures and labs.  Class absences must be explained PRIOR to the missed class. 

 

Homework assignments must be handed in on time; 10% will be taken off for each day late. 

 

All students are required to design a final research project using a combination of techniques discussed in lecture.  Students are encouraged to perform and present data analysis related to their primary research interest.

 

Grading policy

70% homework (7 assignments); 20% final project; 10% classroom participation

 

Final Project:

Each student will design, implement, and present a small-scale data analysis project. The project should use multiple programs and/or techniques discussed in the class. Geophysics data is preferred and a project related to the studentŐs own research is encouraged. Use of SAC and/or Matlab and/or GMT as part of the project is mandatory.  Topic should be decided on and approved by me no later than Nov. 1st. Presentation of results will take place in lieu of a final exam.  Presentations should be done in Powerpoint or Keynote and last between 15-20 minutes. The project should be thoroughly documented and all scripts/programs will be turned in as part of the grade.

 
Homeworks (pdfs):


Homework 1 Basics of Unix
Homework 2 Matlab 1
Homework 3 Matlab 2
Homework 4 Scripting
Homework 5 SAC   NM.station.list
Homework 6 GMT (note that the figures are in color)
Homework 7 Matlab GUI


Laboratories (pdfs):


Lab 1: Basics of Unix1
Lab 2: Basics of Unix2 & IRIS    vim quick reference

Lab 3: Intro to Matlab
Lab 4: Matlab and SAC
Lab 5: Awk
Lab 6: SAC
Lab 7: GMT
Lab 8: Matlab GUI

Course Schedule:

 

Aug. 30

Introduction & Operating Systems

 

Basics of the Unix/Linux environment

Sept. 1

Unix Philosophy, Account Information, Directory Structure

Unix Book: Chapter 1 & 2

Sept. 3

Common commands

 

Sept. 6

Labor Day, No classes

 

Sept. 8

Shells & your Unix environment

Unix Book: Chapter 3 & 8

Sept. 10

Laboratory 1

 

Sept. 13

File Permissions and text editing

Unix Book: Chapters 4 & 5

Sept. 15

Manipulating and printing files; Regular Expressions

Unix Book: Chapter 6 & 14 (15 in 3rd edition)

 

IRIS Website

Sept. 17

IRIS

 

Sept. 20

Laboratory 2

 

Matlab

Sept. 22

Introduction and Matrices

Getting Started with Matlab: Chapter 2

Homework 1 on Basics due

Sept. 24

Math and Operators

 PDF version of lecture with all slides

Sept. 27

More on Matrices; Functions; Graphics

GSM: Chapter 3

Sept. 30

Laboratory 3

 

Oct. 1

Programming 1

GSM: Chapter 4

  Oct. 4
  Programming 2

Oct. 6

Programming 3

Homework 2 on Matlab due

Oct. 8

Matlab and SAC formatted data

 Polarization code and routines below

Oct. 11

Laboratory

 

Shell Scripting

Oct. 13

Basic scripting

Unix Book: Chapter 9 & 10

Oct. 15

Loops and Logic

Scripting (handout): Chapter 1;

Oct. 18

Fall Break

 

  Oct. 20
  Awk 1   Awk Article 1; Bob's notes on printf
  Homework 3 on Matlab due
  Oct. 22
  Awk 2
  Awk Article 2 & 3; Bob's awk notes on quotes and regular expressions

Oct. 25

Laboratory

Out of town...expect a sub

Oct. 27

No Class

Out of town

Seismic Analysis Code (SAC)

Oct. 29

Basic data manipulation

SAC Manual (html), Parts 1-4, 9-10

Nov. 1

Filtering and Spectral Analysis

SAC Manual (html), Parts 5-8
Homework 4 on Scripting and Awk due

Nov. 3

Blackboard Variables & Macros

 

Nov. 5

Laboratory

 

Generic Mapping Tool (GMT)

Nov. 8

Basic and Plotting in X-Y space

GMT Manual (pdf), Chap 1-4

Nov. 10

Maps

GMT Manual (pdf), Chap 5 & 6
Homework 5 on SAC due

Nov. 12

Maps continued

 

Nov. 15

Laboratory

 

Matlab and GUIs

Nov. 17

GUIs

 program

Nov. 19

GUIs continued

speedyseis.m    speedyseis.fig
simple_gui.m   simple_gui.fig
get_sac.m

Nov. 22

Laboratory

Homework 6 on GMT due

  Nov. 24   No Class     I don't believe in classes the day before Thanksgiving and will be out of town.

Nov. 26

Thanksgiving Break

 

Common Programming Languages

Nov. 29

C and C++

 

Dec. 1

Fortran

 

Dec. 3

Compiling and Debugging

 

Final Projects

Dec. 6,8

Presentations

Homework 7 on Matlab GUIs due on the 8th


---------------------------------------------------------

Bonus Problem:  Vectorize the polarize.m script

run as >> polarize('syn',10,1,0.02,1)
polarize.m  calculates the azimuths of incoming waves on 3 component data using PCA
sac.m
loadsac.m
dmean.m  removes the mean
csigm.m  generates a data matrix from 3 vectors over a given window
bandpass.m  order 2 butterworth bandpass filter
testchirps.m  generates synthetic surface waves

 

Loop for calculating AZ
if (lone>=0)
    if (lons>=0)
        if(lons>lone)
             az1=az1;
        elseif(lons<lone)
            az1=360-az1;
        end
    elseif (lons<0)
        if(lons<(lone-180))
            az1=az1;
        elseif(lons>(lone-180))
            az1=360-az1;
        end
    end
elseif (lone<0)
    if(lons<0)
        if(lons>lone)
            az1=az1;
        elseif(lons<lone)
            az1=360-az1;
        end
    elseif(lons>=0)
        if(lons<(lone+180))
            az1=az1;
        elseif(lons>(lone+180))
            az1=360-az1;
        end
    end
end


Link to video about Matlab optimization

http://blogs.mathworks.com/videos/2009/04/17/speeding-up-dougs-solution-with-the-profiler/