Convert data between sac binary and ascii files
The pathname can be a relative or absolute one. A wildcard laden token that expands to a list of filenames. All commands in SAC work on the data that is currently in memory.
This data in memory is analogous to the temporary or working files used by a text editor. The READ command transfers data from one or more disk files into memory. The default is to read all of the data from each disk file. The CUT command can be used to specify that only a portion of each disk file be read. SAC files produced in or after the year are presumed to have a four digit value for the year. Files with two digit year values will be assumed to be in the twentieth century, and will be incremented by Normally all data in memory prior to the execution of another READ command is lost.
The new data replaces the old data. If the keyword MORE is the second symbol in the command, the new data is placed in memory after the old data.
The data file list becomes the concatenation of the old file list and the new file list. There are three cases where the MORE option may be useful:. Examples of each of these cases are given below. The filenames may be simple filenames in the current directory or they may be absolute or relative pathnames pointing to other directories on your system. Examples of absolute pathnames are:.
In the above examples "disk" is the name of a physical disk partition, "dir" is the name of a top level directory, "subdir" is a subdirectory of that partition, and "file" is a file in that subdirectory. In general there is no limit on the nesting of subdirectories. Filenames may also contain wild-card characters.
You can use them match a single character, to match zero or more characters, and to form groupings of characters. Some examples are given below. See the WILD command for more examples and a complete explanation of all the wildcarding options.
In SAC format a very flat format , such consistency is not as important, and in some cases, it is lost. Anytime data is loaded into SAC, it is stored in both buffers. If matching evids are found, it could be that the two files have identical event information, or it could be that the match is an artifact of the merge of these two different data formats within SAC. It is expected that the user will have some idea if the data files are consistent, if they share event information, etc.
Any time in between that data is loaded into memory with the MORE option, it becomes part of the existing history. All commands which load data into memory are now monitored to maintain a level of confidence in the event information when moved from the SAC data buffer to the CSS data buffer.
When requisite levels of TRUST and confidence are present, matching event IDs are treated as an indicator that the two files share identical event information. This being the case, the event IDs are left unchanged. When requisite levels of TRUST and confidence are not met, matching event IDs are are treated as artifacts of the merging of two different data formats: The following commands are considered HIGH confidence: Commands written by the user and added to SAC via the external command interface the LOAD command are a special case, since the user writes the code.
For the seismic data this means a single data component recorded at a single seismic station. SAC does not currently work on multiplexed data. There is an issue with the SAC binary data. In UNIX, SAC data is stored according to the "big-endian" byte order high-order byte of the number is stored in memory at the lowest address.
Use a program called "sacsun2linux" to do the job. Make sure that you only run the program once. For GT user, please untar the following file to your home directory, or any subdirectory where you would like to put the tutorial material. But a file named f See below for examples. SAC restore the original data To learn the syntax of each command, use "help command". You can use short version of a command. For example, "p" is the same as "plot", "w" is the same as "write".
SAC Header SAC header consists of important information about the data, such as the sampling interval, start time, length, station location, event location, components, phase arrivals, etc. There parameters will be used by various SAC command to process the data.
It is important to keep your header information complete and updated. To go back to the default listing all headers , use lh default. Current value is the integer 6. This program should also be included in the latest version of SAC. This makes life easy if you need to perform the same type of jobs for many events.
Below is a very simple Macro file that reads in three component seismograms and generate a plot with header information in the title. Place file id in upper left hand corner. Below I will show a few examples of these tools and functions. Rotate a pair of data. We can easily rotate a pair of data components through an angle in SAC using the "rotate" command. Each pair must have the same station name, event name, and sampling rate.
The most common practice is seismology is to rotate two horizontal component seismograms to be along and perpendicular to the "great circle path" i. See below for an example of rotating two horizontal seismograms recorded at the broadband station BK. Waveforms recorded at this and other nearby stations are used to study non-volcanic tremor in central California triggered by teleseismic events Peng et al.
Use the cut command to cut them into the same length if needed. Phase picking can be easily done in SAC via automatic phase picker "apk", or manually phase picker "ppk".
But this command could mess up the data if you have used the cut command. Lupei Zhu, Professor of Geophysics at St. Some of these programs are used in this tutorial. See below for a list of the codes available and Disclaimer in the package. It is an university research consortium dedicated to exploring the Earth's interior through the collection and distribution of seismographic data Ref: Basically IRIS is where seismologists get instruments to do seismic experiment, and download seismic data for scientific research.
Other earthquake data centers include: Southern California Earthquake Data Center http: IRIS has a nice tutorial on this: First, please go to the following working directory: You can download waveforms by clicking on the following web page: It will be replaced by Wilber 3.
I will update the tutorial later this year. Next choose Q4 , and the Alaska. Then you will get a page with all events with 5 deg or other specfic range of the clicked point. Click on the following M6.
To make the request relatively modest, let's use the following parameters: Next, we need to select data format, time window and user identifition. After a few minutes, you should get an email notice saying that you data is read to pick up somewhere in an FTP site.
In most case, we will not be able to publish a paper based on only one or two seismograms I was told that people in the early s can do that. In addition, some of the most exciting findings within seismology come from the analysis of massive continous seismic waveforms that are otherwise considered as noise e.
Hence, we need to analyze hundreds and thousands sometimes even more of seismic data first. How can we do that?