[Geophysics] MATLAB in geophysics?

Jeff Barker jbarker at binghamton.edu
Sun Sep 16 11:28:56 PDT 2007


Hi all,

Like Jackie, I was not able to attend the workshop this summer.  If I 
had, I think I would have presented how MATLAB can be used in a 
sophomore-level Geophysics course for Geology majors.  Very few of 
these students are likely to become Geophysicists, so I think it is 
impractical to expect them to learn to program in Fortran or C++.  We 
have a site license for MATLAB, it offers a great platform for 
visualization and it allows some level of programming to be done by 
the students.

For example, in our first lab activity, students work together in 
groups of 2-3 to write a script to draw a square centered about the 
origin, translate it, rotate it, and test to see if the order of 
operations makes a difference.  That's enough for one lab.

This is a lead-up to the next lab in which I give them a script I 
wrote that plots a 3-D cube.  Students input values into a 
deformation tensor (essentially the strain tensor not constrained to 
be symmetric) to see how this changes the shape of the cube.  They 
see that shear occurs with symmetric off-diagonal terms, rotation 
with anti-symmetric off-diagonal terms and compression-dilatation 
with on-diagonal terms.  But then they discover that if the 
deformation tensor is applied to a rotated cube, the results can be 
quite different.  In MATLAB they can see the before and after 
pictures, superimposed with vectors showing how each apex has moved, 
and can rotate the entire image in 3-D interactively.

Next is a simple follow-up script that includes elastic constants so 
they can see how the stress tensor and strain tensor are related.

In another exercise, students derive Fermat's Principle of Least Time 
for themselves by calculating the travel times between points in a 
2-layered medium for a variety of raypaths, and plot arrival time vs 
incidence angle.  Gee, Snell's Law works!

Using the SeismicLab and SEGYMat packages, students can read in 
shallow seismic refraction or reflection data in SU format, apply 
reduction velocities or NMO corrections, compute a layered velocity 
model and superimpose travel-time curves.  I have a velocity analysis 
script and even a tau-p script for them to try.  These tend to work 
best with fake or synthetic "data", but after seeing how they work, 
students apply them to real data.

Another set of scripts illustrates time series analysis principles.  
After plotting sinusoids with different values of frequency (or 
period), amplitude and phase, students can sum sinusoids to generate 
an impulse (is this possible?) or a boxcar function.

My colleague, Francis Wu has written MATLAB scripts that demonstrate 
P/SV reflection coefficients, complete with phase.  He's also written 
an interactive "earthquake location" script which shows the summed 
station residuals as students select various locations for the 
earthquake.

I know Larry Braile also uses MATLAB extensively in class.  Perhaps he 
presented some of his ideas at the workshop.  

Again, MATLAB may or may not be the best software available for 
teaching in Geophysics.  I don't think I'd go out and buy proprietary 
software for a single course.  However, it is available on our campus 
under a site license so I hope other Geology courses or other courses 
on campus also make use of it.  One of my goals at the sophomore 
level is to break down the barriers to this programming and 
visualization tool so the students know they can make use of it 
later.

Jeff Barker
Binghamton University (SUNY)


On Friday 07 September 2007 14:43, Jackie Caplan-Auerbach wrote:
> Hi there,
>
> I'm a geophysicist who was unfortunately unable to attend the NAGT
> workshop this summer (fieldwork got in the way), so I didn't have
> the opportunity to ask this question to everyone at that time. 
> Hopefully it's okay to use this listserv to do so now.
>
> I'm very curious whether other geophysics faculty are using MATLAB
> or other similar software in their undergraduate classes.  I teach
> at a university that is primary undergraduate, although we have a
> strong master's program in geology.  Our undergraduate students
> largely become licensed geologists or work in industry following
> graduation, although some do go on to graduate school.  Although
> our strengths have traditionally been in field geology we're
> working very hard to develop our geophysics and engineering
> geology.  However, there's no question that our students lack
> confidence and skill in quantitative areas.
>
> I'm a user of MATLAB, and have always wanted my students to have
> some familarity with it.   I know that it can be very helpful to
> those who go on to graduate school, and I suspect that at least
> some will see it in industry (although I'm not sure).  It also
> helps those students who want to do research with me (graduate or
> senior thesis), since all of my research is MATLAB based.  However,
> they really struggle with it, and I wonder if I'm beating my head
> against a wall for no reason.  Another member of our faculty is a
> user of MathCAD, which the students love, but I'm not aware that it
> gets much use elsewhere.
>
> I'd be very interested in learning what other schools are doing. 
> Do you use any software for quantitative analysis?  Excel? 
> Mathematica? MATLAB?  MatCAD?  Do you introduce it on the
> undergraduate level?  On the graduate level?  Do you use it in the
> classroom, or just for research?  Do other departments in your
> university use this software? Does anyone know how widely these
> software packages are used outside of academia or research?
>
> Any thoughts would help enormously.
>
> Aloha and thanks in advance,
> Jackie

-- 
----------------------------------------------------------------
Jeffrey S. Barker
Assoc. Prof. of Geophysics      jbarker at binghamton.edu
Dept. of Geological Sciences    www.geol.binghamton.edu/~barker
SUNY Binghamton                 (607) 777-2522
Binghamton, NY  13902-6000      FAX (607) 777-2288


More information about the Geophysics mailing list