previous up next print clean
Next: ILLUSTRATIVE EXAMPLES Up: GETTING GOING Previous: History files and datapaths

The SEPlib datacube

If we have data frames of the same size (like shot records usually are) we can easily merge them into a ``datacube'' to make their processing easier. Let's try to merge the three files Txx.H, Txy.H and Txz.H into a datacube using the program ``Cat'', which does to SEPlib files something like what ``cat'' does to ASCII files.

Cat Txx.H Txy.H Txz.H > Three.H
Now make a wiggle plot of this new file by doing:
Wiggle < Three.H | Tube

Pretty snazzy, eh? Tube realizes that there are three different panels, so it shows all three of them.[*]

Look at the history file Three.H to see how history ``accumulated'' in this example. In general, each successive SEPlib program writes more information onto the end of the history file. (Cat is a bit of a special case, since it is always called with multiple input files and doesn't use redirected input. Most SEPlib programs read a file from standard input and write a file to standard output. The SEPlib input and output subroutines shared by all such ``standard'' programs begin by automatically copying the input header straight across to the output unchanged. Anything the running program wants to add to the history then gets appended. Cat has to do the copying ``by hand'', so its output looks a little different.)

Note that lines setting parameters such as ``n3=1'' can occur multiple times in one history file, as various programs set old parameters to new values. The last-defined value is the only valid one, because it is the ``most recent'' and corresponds to the current data.

You might be thinking now that using ``more'' to examine history files to find the dimensions of the associated data file can get confusing and tedious if the history is long and complex. A quick way to examine the dimensions and properties of a SEPlib file is to use the command ``In'':

In Three.H
gives the salient features of the dataset
        expands to in="/usr/local/sep/scr/joe/Three.H@"
        n1=1024 n2=20   n3=3            61440 elem      245760 bytes
        d1=.002 d2=.1   d3=1
        o1=0    o2=.1   o3=0
        label1=Time, seconds
        label2=Offset, kilometers
Note that ``Three.H'' is a three-dimensional block of data, with n3=3.

When you are done with Three.H, delete it by doing

Rm Three.H
This will delete both the history file and its associated binary data file. If you slip and accidentally use rm instead, the binary data file will remain behind uselessly cluttering up your data directory, possibly forever if nothing ever looks for junk files to clean up there.

Warning: the default behavior of both rm and Rm is to go ahead and delete without confirmation. You probably have rm aliased to rm -i (you may have forgotten doing it), but you probably don't have Rm aliased to Rm -i.

previous up next print clean
Next: ILLUSTRATIVE EXAMPLES Up: GETTING GOING Previous: History files and datapaths
Stanford Exploration Project