For any given file, some of these variables will not have meaningful values. These are refered to as "undefined variables" for that file. For each data type, a special value signifies this undefined state.
They are listed in a table at the end of this section. This table lists the header types and their definitions. The third column lists the special value used to signify that a particular header variable is undefined in a particular file. This file is essentially the alphanumeric equivalent of the SAC binary data file. The header section is stored on the first 30 cards. This is followed by one or two data sections. The data is in 5G The following table shows the card number, formats and names of the variables on the header section cards.
The header section and first five lines of the data section of a sample SAC alphanumeric data file is shown below. You can reproduce this file with the entire data section on your system by executing the following commands:. You can then convert this alphanumeric file to a binary one and read it into SAC with the following commands:.
This little test shows the equivalence of the alphanumeric and binary file formats. Listed next are the first lines of TEMP1 -- header plus first 8 lines of data. This gives you more sophisticated tools for aligning signals with different origin times so that they will produce coherent signals when stacked. We will not cover these time alignment tools in this class, but once you know the basics of how to stack signals using the subprocess it is not difficult to figure them out.
To start a signal stacking subprocess, enter sss into SAC. Once you enter a subprocess, you will not have access to the full extent of SAC commands, so see the manual to know what commands are allowed. Once you have started the stacking subprocess, you can stack waveforms in the same way as before, the only difference is the commands that you will use. Useful commands include:.
This does essentially the same thing as the simple procedure outlined above for stacking files. However, the additional tools for defining time windows, the simple way for zeroing out the data in memory, and the ability to see the signals separately along with the stacked sum make the subprocess a better way to carry out stacking operations.
Exercise: Modify the macro you wrote above to stack the noisy signals that I have provided to use the signal stacking subprocess. Write your result to disk so that you can retrieve the stacked result in the main part of SAC. Quick search. So for instance,: read file1. Only time values within this window will be read into memory, when you add additional files to be stacked.
To zero out the stack, enter zerostack to start with a clean signal. This is the equivalent of addf within the stacking subprocess, but is different in that the original file in memory is not overwritten. SAC commands fall into three main categories: parameter-setting, action-producing and data-set manipulation.
The parameter-setting commands change values of internal SAC parameters. Action-producing commands perform some operation on the signals currently in selected memory based upon the values of these parameters. Data-set commands determine which files are in active selected memory and therefore will be acted upon data-set commands are not currently operational.
The effect of a parameter-setting command remains in effect until it is reset. The effect of an action-producing command is immediate and transitory. Action-producing commands also have options which normally remain in effect until reset. These options, however, apply only to that particular command.
The underlying assumption is that you are more likely than not to want to use the same values the next time you execute the same command.
When you start up SAC, default values are defined for all of these parameters. This command generates an impulse function and stores it in SAC's memory. To see what this function looks like on your screen type:. At what time is the peak? Store your answers in a file called intro. There are abbreviations for the most used SAC commands. Let's change the device:.
The ls command is the same one you use on the UNIX command line to list files in the current directory. It should show you a file named f This is very useful when first learning how to use SAC because you can see how the other SAC operations work on these functions. For example, type:. In most case, you 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.
Instead, you need to analyze hundreds and thousands sometimes even more of seismic data first. How can we do that?
Basically we have to reply on computers to do most of the dirty job. Shell script language e. Below are some examples to show how you can interact with SAC using shell script. SAC gawk -F". SAC backup move the rest SAC file to backups Example 2: cut the two horizontal component data so that they will have the same length, which are needed for rotation in SAC. An important step in data processing is to document what we have done to the data, so that other people can reproduce your results.
Also sometimes you need to reprocess the data, but maybe you have forgot the commands and parameters you have typed a few months ago. There are two ways to document your scripts. The first way is simply to write a shell script. I wrote a simple shell script named preprocess.
Note that sometimes you may want to redo only part of the job. So I add a flag for each step, and you can reset the flag to turn that step on and off. Another way is to write a Makefile, and put each step seperately. Makefile was originally used for compiling a collection of computer codes.
0コメント