Seismic Analysis Code (SAC)

Slides:



Advertisements
Similar presentations
CC SQL Utilities.
Advertisements

Importing Data into IX1D v 3 – A Tutorial © 2006 Interpex Limited All rights reserved Version 1.0.
Seismic Analysis Code (SAC)
Seismic Analysis Code (SAC)
MATLAB SAC. MATLAB SAC Data Format and Header Each signal or seismogram is stored in a separate binary or alphanumeric data file. Each data file contains.
 Use the Left and Right arrow keys or the Page Up and Page Down keys to move between the pages. You can also click on the pages to move forward.  To.
ASL QC Procedures Status and plans. GSN ANSS Traditional Waveform Review  The “morning run” Daily summarizes problems with availability, timing,
Data Manipulation Overview and Applications. Agenda Overview of LabVIEW data types Manipulating LabVIEW data types –Changing data types –Byte level manipulation.
Antelope Relational Database Management System A practical introduction.
Programming Types of Testing.
SAC: An Overview.
Shape Editor Programming Example
Manufacturing Automation
Lab6 – Debug Assembly Language Lab
MATLAB’s extensive, device-independent plotting capabilities are one of its most powerful features. They make it very easy to plot any data at any time.
By Hrishikesh Gadre Session II Department of Mechanical Engineering Louisiana State University Engineering Equation Solver Tutorials.
Methods of Exploratory Data Analysis GG 313 Fall /25/05.
Linux+ Guide to Linux Certification, Second Edition
Introduction to Array The fundamental unit of data in any MATLAB program is the array. 1. An array is a collection of data values organized into rows and.
1 QED In Vivo USB Input Output Box configuration This tutorial contains a number of instructions embedded in a great deal of explanation. Procedures that.
Ch 11 Managing System Reliability and Availability 1.
EPSII 59:006 Spring Topics Using TextPad If Statements Relational Operators Nested If Statements Else and Elseif Clauses Logical Functions For Loops.
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
Topics Introduction Hardware and Software How Computers Store Data
Array Response Functions with ArrayGUI
Advanced Report and Form Techniques – Project 7. 2 Project 7 Overview This project shows how to create queries for reports, add command buttons to forms,
RjpSystem Level Programming Operating Systems 1 Having fun withy the Unix Operating System Praxis Week 7 Rob Pooley.
SEISLOG Linux presented at the WORKSHOP High Quality Seismic Stations and Networks for Small Budgets Volcan, Panama March, 2004 by Terje Utheim,
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Getting Started With AutoCAD ENGR 2 Week #1 Laboratory.
Slide 1 Graphics Slide 2 Graphics A graphics package is a general purpose package used to draw pictures (graphics). Once produced, these can be saved.
Processing Lab 3 – Header issues and trace editing Bryce Hutchinson Objectives: Fixing elevation issues Define an LMO function Pick first breaks Kill traces.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Synthetic Seismogram Objectives
Instrumentation Overview Spring 2012 The laboratory is a controlled environment where we can measure isolated physical phenomena with a view to eventual.
Chapter 11: Block References and Attributes. After completing this Chapter, you will be able to use the following features: Create and insert block references.
Practical PC, 7 th Edition Chapter 4: File Basics.
Processing Lab 2 – Geometry Bryce Hutchinson Objectives: Add a dictionary Gain a better understanding of header issues Display geometry correctly Visualize.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
Chapter 3 Response Charts.
Computing Fundamentals Module Lesson 7 — The Windows Operating System Computer Literacy BASICS.
Creating visual interfaces in python
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
A First Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington Credits: a significant part of.
Intermacs Form Download Excel Tutorial Pivot Tables, Graphic Tools, Macros By: Devin Koehl.
Ⅰ. PS Driver ML-4050N Series PostScript, Driver ML-4050N Series PostScript, Driver.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Postgraduate Computing Lectures PAW 1 PAW: Physicist Analysis Workstation What is PAW? –A tool to display and manipulate data. Learning PAW –See ref. in.
SAC: An Overview SAC ( “Seismic Analysis Code” ) was originally developed by LLNL An interactive program for time-series data with emphasis placed on.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
Data Analysis GUI Documentation guide. Terminology GUI – Graphical User Interface Log-File – File containing data of interest which is generated by user’s.
Software testing techniques Software testing techniques REGRESSION TESTING Presentation on the seminar Kaunas University of Technology.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
Video System Dr inż. Zdzisław Pólkowski Badea George-Cosmin.
SAC: An Overview SAC ( “Seismic Analysis Code” ) was originally developed by LLNL SAC ( “Seismic Analysis Code” ) was originally developed by LLNL An interactive.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
REGRESSION TESTING Audrius Čėsna IFM-0/2. Regression testing is any type of software testing that seeks to uncover new errors, or regressions, in existing.
Seismic phases and earthquake location
Lecture 3 Translation.
Assembly Language Programming Part 3
Relates to machining and turning centers
Modbus with the AKD Using Modbus Poll and Wireshark Rev. F Dec
OptiSystem-MATLAB data formats (Version 1.0)
Chapter 2: The Linux System Part 2
OptiSystem-MATLAB data interchange model and features
Topics Introduction Hardware and Software How Computers Store Data
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Modern PC operating systems
Presentation transcript:

Seismic Analysis Code (SAC) Basic Data Manipulation

SAC Seismic Analysis Code was developed at Lawrence Livermore National Laboratory and University of California in the early 1980's. It is a command-driven program generally implemented on many types of UNIX operating systems and has become a standard data manipulation tool in seismology. Its binary data format is one of the principle data formats used today in storing and manipulating seismological time series data.

SAC was designed as an aid to research seismologists in the study of seismic events. As such, it is used for quick preliminary analyses, for routine processing, for testing new techniques, for detailed research, and for creating publication quality graphics. ceri% sac SEISMIC ANALYSIS CODE [09/04/2008 (Version 101.2)] Copyright 1995 Regents of the University of California SAC>

What can it do? Interactively read seismogram data Perform many standard data processing operations, such as Filtering Time picks Amplitude picks Correlation Fourier transforms Seismic instrument corrections Particle motion rotation Trace envelopes Spectral ratios Linear regressions Frequency-wavenumber analysis Create a variety of plots of the data and resulting analysis

SAC’s competitors (analysis) Various versions of DATASCOPE (now Antelope) MATSEIS/Coral other Matlab based programs SEISAN XPICK Seismic UNIX others

SAC’s competitors (data format) SEED (Standard for the Exchange of Earthquake Data) SEISAN (widely used in Central and South America/Europe) CSS (Center for Seismic Studies, associated with treaty verification) SUDS (Seismic Unified Data System, from Willie Lee PC based system/USGS) SEG-Y (the standard for seismic reflection data) AH (Ad Hoc, pre-SEED shows up from AVO/HVO, etc. in archives) Others (new ones crop up every 5-10 years to address the chaotic state of affairs.)

Commands SAC commands fall into three main categories Parameter-setting: change values of internal SAC parameters Action-producing: perform some operation on the signals currently in selected memory based upon the values of these parameters Data-set: determine which files are in active (selected) memory and therefore will be acted upon

Commands HELP calls up a list of all commands help command can be used to view manual pages

Defaults In order to make SAC quick to learn and easy to use, default values for all operational parameters were carefully chosen. At the same time, almost all of these parameters are under direct user control. SAC can be reinitialized to this default state at any time by executing the INICM command.

Data Format and Header Each signal or seismogram is stored in a separate binary or alphanumeric data file. SAC can read data in a variety of formats: SAC Binary Format (most common) CSS format SDD format ASCII formats Each data file contains a header that describes the contents of that file.

listhdr (lh): lists the headers of the files in memory. SAC> listhdr FILE: ccm_sumatra_.bhe - 1 ---------------------- NPTS = 389396 B = 0.000000e+00 E = 1.946975e+04 IFTYPE = TIME SERIES FILE LEVEN = TRUE DELTA = 5.000000e-02 IDEP = UNKNOWN DEPMIN = -1.073057e+06 DEPMAX = 1.091875e+06 DEPMEN = 8.429739e+02 OMARKER = 7.315 (origin ) KZDATE = DEC 26 (361), 2004 KZTIME = 01:09:52.684 IZTYPE = BEGIN TIME KSTNM = CCM CMPAZ = 9.000000e+01 CMPINC = 9.000000e+01 STLO = -9.124470e+01 DIST = 8.818225e+03 AZ = 1.854116e+02 BAZ = 2.013326e+02 LOVROK = TRUE NVHDR = 6 LPSPOL = TRUE LCALDA = TRUE KCMPNM = BHE KNETWK = US listhdr (lh): lists the headers of the files in memory.

Time The SAC header contains a reference or zero time, stored as six integers (NZYEAR, NZJDAY, NZHOUR, NZMIN, NZSEC, NZMSEC), but normally printed in an equivalent alphanumeric format (KZDATE and KZTIME). SAC> lh #list header FILE: GRAT.EHZ.NM – 1 #this is a partial header ----------------- NPTS = 360100 B = 0.000000e+00 E = 3.600990e+03 IFTYPE = TIME SERIES FILE DELTA = 1.000000e-02 KZDATE = APR 06 (097), 2008 KZTIME = 02:59:59.320

Event and Station Info SAC header can store station and event info SAC> lh FILE: WMQ.BHZ.D.1995.073:10.34.49 - 1 --------------------------------- KSTNM = WMQ STLA = 4.382110e+01 STLO = 8.769500e+01 STEL = 8.970000e+02 EVLA = 3.086000e+00 EVLO = 9.584800e+01 EVDP = 3.040000e+01

Once the event and station information are store, the program automatically calculates and stores distance (km), azimuth (degrees), backazimuth (degrees), and great circle arc length (degrees) DIST = 4.583862e+03 AZ = 3.510350e+02 BAZ = 1.675856e+02 GCARC = 4.120298e+01

Phase Info SAC can be used to pick and store phase information in header variables A & T0-T9. The Omarker is reserved to for the origin time. All pick and origin times are stored in secs from the zero time of the file. OMARKER = 0 AMARKER #not set in this example T0MARKER #not set in this example T1MARKER = 462.7 (P) T2MARKER = 834.76 (S) T4MARKER = 472.5 (pP) T6MARKER = 478 (sP)

Data File Command Module This module is used to read, write, and access SAC data files. READ (r): reads data files from disk into memory SAC> r *.SAC #read any files that end in .SAC Uses standard UNIX wildcards: reads all files whose filenames end in “.SAC”

Data File Command Module WRITE (w): writes the data currently in memory to disk You can write manipulated data into a range of file formats or simply overwrite the current set of files (so be careful, you have been warned!)

Let’s try it (and also jump ahead to graphics action module to plot (“p”) it) – SEISMIC ANALYSIS CODE [8/8/2001 (Version 00.59.44)] Copyright 1995 Regents of the University of California SAC> read ccm_sumatra_.bhz SAC> plot

Let’s try it (and also jump ahead to graphics action module to plot (“p”) it) – SEISMIC ANALYSIS CODE [09/04/2008 (Version 101.2)] Copyright 1995 Regents of the University of California SAC> read ccm_sumatra_.bhz SAC> plot

This seismogram is 20,000 seconds long, with samples 20 times per second. It has over 3,890,000 points and would take almost an hour to draw at 9600 baud, which was the rate of computers when SAC originally written.

Enter QDP (Quick and Dirty Plot mode) to the rescue. Look at the lower right corner. There is a box there with the number 779. This tells us that SAC is displaying every 779th point (that’s one point every 39 seconds).

Since we are on a modern computer we can afford to plot all the data So we turn the QDP “feature” off SAC> qdp off SAC> plot This plot is now “good”.

So far there is one file in memory So far there is one file in memory. If we simply read in another one – it will clobber what we have there. If we need to read in more data (say we have processed the data we’ve read in and now want a spectral ratio of the processed data with the original data) we have to use the “more” option to read in the additional data. SAC>read more filename

In general SAC does commands to all the files in memory. If the command is starting from scratch (like a read) it clobbers what is already there. Some commands require certain pairs of files

Let’s try a few more things. Here I have to be a little more careful when I specify the file name. I want to read in all 3 components of the seismogram. SAC> ls *sumatra*bh* ccm_sumatra_.bhe ccm_sumatra_.bhn ccm_sumatra_.bhz ccm_sumatra_bhz.ai ccm_sumatra_bhz.ps ccm_sumatra_bhz.tif SAC> r *sumatra*bh? ccm_sumatra_.bhe ccm_sumatra_.bhn ccm_sumatra_.bhz

Try the plot command. SAC> plot Waiting SAC plots the traces one at a time, in the order they are stored in memory. Each time you enter a <CR> it plots the next trace. (and says Waiting if there are more traces to display, or the prompt if not).

New command – plot1 ( “p1”). SAC> plot1 SAC> This command plots all the data in memory on one plot.

Say I want to process these three traces together. Notice that the three traces do not start at the same time (and we will see that they are not the same lengths, either).

We can fix the time alignment using synchronize (“synch”): which modifies the headers of the files in memory so that they all have the same reference time. SAC> synch SAC> plot1

Before synch After synch FILE: ccm_sumatra_.bhe – 1 NPTS = 389396 B = 0.000000e+00 KZDATE = DEC 26 (361), 2004 KZTIME = 01:09:52.684 FILE: ccm_sumatra_.bhn – 2 NPTS = 389328 KZTIME = 01:09:48.485 FILE: ccm_sumatra_.bhz – 3 NPTS = 389600 KZTIME = 01:09:43.684 B = 0.000000e+00 KZDATE = DEC 26 (361), 2004 KZTIME = 01:09:52.684 B = -4.199000e+00 B = -9.000000e+00

Data File Command Module CUT: defines how much of a data file is to be read. Need to reread the data after specifying a cut SAC> cut t1 -5 30 #cuts 5 s before, 30 s after t1 pick SAC> r WMQ.BHZ.D.1995.073:10.34.49

READHDR (rh) and WRITEHDR (wh): read and write headers without the data LISTHDR (lh): list the header contents CHNHDR: change header values COPYHDR: copy header values from one file to the others in memory

example: SAC> r WMQ* SAC> chnhdr a 439.8 SAC> lh picks FILE: WMQ.BHZ_10.Q.2004:18:52:27 - 1 ------------------------------- NPTS = 1401 B = 4.347990e+02 E = 4.697990e+02 OMARKER = 0 AMARKER = 439.8 T1MARKER = 439.8 (Pi) SAC> wh #only overwrite the header because not changes were made to the time series

Graphics Action Module PLOT (p): plots each signal in memory on a separate plot. PLOT1 (p1): plots a set of signals on a single plot with a common x axis and separate y axes. PLOT2 (p2): plots a set of signals on a single plot with common x and y axes (i.e. an overlay plot).

SAC> r WMQ. AAK. WMQ. BHZ_10. Q. 2004:18:52:27 AAK. BHZ_00. Q SAC> r WMQ* AAK* WMQ.BHZ_10.Q.2004:18:52:27 AAK.BHZ_00.Q.2004:18:52:53 SAC> r more BJT* BJT.BHZ_00.Q.2004:18:50:19 SAC> plot Waiting

SAC> p1 SAC> p1 rel

SAC> color on increment on SAC> p2 SAC> p2 rel

Graphics There are three graphics ``devices'' currently supported. SGF is a general purpose device driver representing a large class of actual physical devices. XWINDOWS is a general windowing system running on most high-resolution, bit-mapped graphics workstations. SUNWINDOW, is a windowing system that was available on the Sun in SunOS 4.X.

Xwindows or X X is widely used on the graphics workstation and offers one of the best frameworks for developing portable window-based applications. Should be the default graphics device. Can be turned on using the begin device (bg) command sac> bd x

SGF (SAC Graphics File) SAC Graphics File contains all the information needed to generate a single plot on any graphics device. Each plot is stored in a separate file. The file names are of the form ``Fnnn.SGF'' where ``nnn'' is the plot number, beginning with ``001''. Can be turned on using sac> bd sgf

To create a postscript plot, you would turn on the sgf device, create your plot, and then run a conversion program called sgftops SAC> bd sgf SAC> p1 rel #plot waveform to file f001.sgf SAC> sgftops f001.ps newplot.ps SAC> ls newplot.ps newplot.ps SAC> bd x #or ed sgf