previous up next print clean
Next: Useful non-SEPlib programs Up: MACHINE-SPECIFIC ENVIRONMENT Previous: Xtex under OpenWindows

SEPlib Programs

Note that the Names of these Programs all begin with an Upper-Case Letter.

Add
A versatile program for doing element-by-element mathematical manipulations on one or more data files. It can be used to form linear combinations of two or more files, multiply two or more files, or divide one file by another. It can also be used to scale a file or take the absolute value, square root, logarithm, or exponential.
Again
Take the arctangent of a floating-point data file element by element.

Agc
Automatic gain control with first-arrival detection.

Aniso2d
Two-dimensional anisotropic heterogeneous elastic modeling.

Arcy
Convert SEGY tapes or files to SEP's version of SEGY (``sepy''), or (with an option) to SEPlib data cube files.

Balance
Perform trace balancing.

Bandpass
Butterworth bandpass filtering. See also Lpfilt.

Box
Box outputs the vplot commands to draw a balloon-style label. Options let you position the box and pointer, control the size of the labeling, etc. (It is even possible to draw boxes with perspective.) The boxes can be overlayed onto vplot graphics files using the ``erase=once'' option of pen filters. For example, ``Tube < Wiggleout.H Boxout.H erase=once''. The interact option of pen filters can be used to determine the coordinate of the spot the box's pointer is to point at. (Alas, not all pen filters support the ``interact'' capability.) The special pen filter Vppen can be used to combine vplot files.

Byte
Convert floating-point SEPlib data (esize=4) to byte-deep SEPlib raster data (esize=1). Usually used in conjunction with Ta2vplot or X11movie. The clip value is determined by the option ``pclip'' for ``percentile clip''. pclip=50 gives the median, pclip=100 the maximum, etc. The percentile clip can be calculated based on one particular input panel or all the input panels. (It is also possible to simply specify your own clip, which can speed the program up tremendously.) The input data is assumed to be about equally split between positive and negative values; an option is available for mapping input data that is all positive to the entire possible range of output values. Several other conversion options are available that are useful for bringing out hidden features in data, such as a sign-preserving gain parameter ``gpow''.

Cabs
Complex (esize=8) to real (esize=4) conversion; take the absolute value of complex-valued data. (Alternatively, if you consider the input data to be (X,Y) coordinate pairs, output the Euclidean norm.)

Cat
A synonym for ``Merge space=n''.

Cfft
Complex fast-Fourier transform. Requires complex-valued input data (esize=8).

Clip
Find a ``clip'' value for the input data, and put it into the header. With appropriate options performs several sorts of clipping on the data as well, such as changing all clipped or unclipped values to some given value, etc. The clip value is determined by the option ``pclip'' for ``percentile clip''. pclip=50 gives the median, pclip=100 the maximum, etc.

Cmplx
Combine two real (esize=4) data files into one complex data file (esize=8). Note that some programs such as Graph treat esize=8 data files as (X,Y) coordinate pairs, so this program can also be thought of as a way to combine an ``X'' and a ``Y'' file into an ``(X,Y)'' file. See also Real and Imag.

Conj
Take the complex conjugate for each element of a complex-valued dataset. (I.E., change the sign on the second real number in each element of an esize=8 dataset.)

Contour
Input a real-valued (esize=4) dataset and output vplot commands for a two-dimensional contour plot of the data. (The vplot output can be viewed on a screen using the program Tube, or plotted on a postscript printer using Pspen.) Contour has many, many options to specify at what values to draw contours, where to position the plot on the page, how big to make the plot, which way to draw the axes, where to place tick marks and labels, etc, etc, etc. All of these parameters attempt to default reasonably. Contour also allows auxiliary input files which can be used to annotate the contour plot with symbols, curves, or arrows. You may find the utility programs Window and Reverse useful for pre-processing data to be plotted with Contour. See also Vppen and Box for a crude way of adding annotation, and plas and pldb for a crude way of editing.

Dd
Convert data from one esize to another. Possibilities for esize are 0 (ASCII), 1 (byte-deep raster), 2 (short integer), 3 (real with least-significant byte truncated), 4 (real), and 8 (complex). Dd currently attempts to perform all conversions in core, so it is only useful for converting relatively small datasets.

Disfil
Formatted display of a binary data file. Allowable input types are real (both IEEE and native), integer, complex, and byte. The default depends on the input esize but can be overridden from the command line. There are several options that can be used to control the format of the output ASCII data if you don't like the default. There are also options for changing the reading frame or only showing some subset of the input data. The default is to start at the beginning and show everything.

Dot
Read in two files (one from standard input, one from an auxiliary input). The data read from standard input is passed to the output unchanged. The header file of the output file will have the value of the dot product of the two files appended onto the history as a new parameter ``dotprod=''.

Dots
A program somewhat like Wiggle, but better in some ways because it tries to be smarter. The output style depends on the input n1 and n2. For loosely packed traces with only a few data points Dots plots the data as lollipops on strings, showing each data point clearly. There are also options for separately labeling each trace, omitting dead traces, making bar graphs, etc. As n1 and n2 increase Dots by default simplifies the output and eventually behaves almost the same as Wiggle. Unfortunately Dots does not use the axis drawing and plotting routines shared by Wiggle, Contour, Graph, and Ta2vplot, and so Dots' options and output plot size, position, and axes are currently incompatible with those for other plot programs.

Energy
Calculate energy in running windows along fast axis of data.

Filter
Filtering along the fast axis performed in the frequency domain. The filter is read from an auxiliary input file. (This old FORTRAN program does not do dynamic allocation; the input trace length is hardcoded to a limit of 4096 samples.)

Ft3d
One, two, or three-dimensional Fast Fourier transform. The input and output are complex-valued (esize=8). The sign of the Fourier transform on each axis can be set from the command line or history file. Ft3d writes the opposite sign onto the output history file so a second application will automatically perform the inverse of the first. A sign of 0 skips transforming on that axis entirely. There are options to allow centering of the origin in the output domain, to make a graph of the output easier to understand.

Ftplot
Output vplot commands to plot an input real time series and its Fourier amplitude or phase spectrum.

Gpow
Raise each element of an input data file to a power, preserving sign. The power to use defaults to unity, so you probably want to specify it.

Graph
The standard SEPlib program for making graphs of all sorts. The input data can be real numbers (esize=4) or coordinate pairs (esize=8). (See Cmplx for converting separate X and Y files into one (X,Y) file.) The output will consist of n3 graphs, each plotted with their own axes set according to the data in that graph. Each graph will have n2 traces with n1 points in each trace. (Although if the option movie=y is set then n3 will effectively become n1 times n2 and n2 will become one.) If esize=8 the (X,Y) pairs determine the coordinates to draw. If esize=4 the input value is taken as the Y of the pair, as you would expect, while the input d1, o1, and element number are used to calculate the associated X. Graph supports a bewildering variety of plotting options; almost every part of the plot can be moved about or turned on and off. The colors, symbols, line styles, line fatnesses, etc, for each trace can be specified. There are options to set the background screen color and the background graph color. Notably lacking is a mechanism for overlaying labels on the graph. (This is possible to do in a somewhat crude way by simply creating a vplot file with labels in the appropriate position using Box, and appending the plot containing the annotations onto the vplot file containing the graph using Vppen.) Graph sets the output clipping window hard against the limit of its graphing area, so the slightest bug in the positioning of the clipping window by the output ``pen'' filter may clip away extreme parts of the plot. (Single-pixel-off clipping windows is a bug that is unfortunately all too common among ``pen'' filters, so you will probably see this bug sooner or later.)

Halfint
Half-order integration along the fast axis. (Also conjugate and inverse of this operation. The inverse is half differentiation.)

Hypint
Velocity-space transformation via integration (along hyperbolas). (Also does conjugate transpose and pseudo-inverse; the conjugate transpose is hyperbola superposition.)

Imag
Convert from complex (esize=8) to real (esize=4) by keeping only the imaginary component. Alternatively, pull the Y component out of (X,Y) coordinate pairs.

In
Give useful information about a SEPlib header/data file pair. Tells you which of the canonical parameters are set in the header file and which are defaulted, and what values they have. Tells you the expected size of the data given the header and whether the data is actually that size. (Very useful if you want to check on the progress of a running program.) Warns if the data is all zeroes. Etcetera. Unlike most SEPlib programs, In understands four-dimensional datasets.

Interleave
Merge two files on the 2-axis (1 axis is fast, 3 is slow) by interleaving them.

Interp2
Linear interpolation on the 2-axis. (Also can do the conjugate, transpose, and pseudoinverse of this operation.)

Lpfilt
Butterworth lowpass filtering. See also Bandpass.

Ls
Do ``ls'' on the data files associated with the given header files. (Also useful for directly referring to the data file associated with a SEPlib header file, so you can use SEPlib data files as input to non-SEPlib programs. For example instead of Tube < Vplot.H you could do tube < `Ls Vplot.H`.)

Merge
Combine two or more SEPlib header files into one by concatenation. They can be merged along either the fast (1), intermediate (2), or slow (3) axes. By default Merge inserts a few elements' worth of padding at the boundaries between the input datasets.

Mv
Copy (not move, despite the name) a SEPlib header and data file to another name. The output history file name is set on the command line; the associated data file name is determined by the usual rules (involving out=, datapath=, environment variable DATAPATH, a .datapath file, the name of the history file, etc.).

NMO
Standard Normal MoveOut correction via linear interpolation; also can do the conjugate and pseudoinverse of this operation. Make sure to specify a reasonable velocity (or velocity function) for it to use. It wants NMO velocity, not interval velocity; by all means make sure to get the units right!

Noise
Add random noise to data, either Gaussian or uniform.

Pad
Append zeroes onto any of the fast (1), intermediate (2), or slow (3) axes to make a SEPlib file bigger. Defaults to bump up to the next power of two. Also can append zeroes onto the ``0'' axis, for example it pads esize=4 to esize=12 by appending two floating-point zeroes onto each element.

Phase
Phase-shift migration and diffraction.

Pow
Raise data to a power, preserving sign.

Pspen
The vplot ``pen'' filter for postscript devices.

Radial
Transform to radial traces. Also can do the conjugate and pseudoinverse of this operation.

Radnmo
Transform to radial traces and do NMO at the same time. Also can do the conjugate and pseudoinverse (for constant velocity) of this operation.

Raspen
The vplot ``pen'' filter for ``the generic byte-deep raster device''. You can specify the number of pixels in each dimension, the pixel size and aspect ratio, and the number of device colors available. Output is a seplib esize=1 raster file and an associated color table.

Real
Convert from complex (esize=8) to real (esize=4) by keeping only the real component. Alternatively, pull the X component out of (X,Y) coordinate pairs.

Reverse
Flip one or more axes of the dataset.

Rm
Remove a SEPlib header file and its associated data file. Not to be confused with lower-case rm.

Rtoc
Real (esize=4) to complex (esize=8) conversion; the imaginary part is set to zero. This function can also be done as a special case of Pad.

Scale
Trivial data scaling program; multiply a dataset by the parameter ``dscale''. (Beware the special-case behavior of ``dscale=1''!) Add can also be used to scale a dataset, but Add cannot use pipes which makes it somewhat less convenient. Unlike Add, Scale can be used to automatically normalize a dataset so the maximum is (plus or minus) unity. (There are several options governing how much of the dataset is to be normalized at a time.)

Spectrum
Calculate average Fourier-domain amplitude spectra. Accepts real or complex input.

Spike
Everyone's favorite program for creating a SEPlib dataset out of thin air. Can be used to create a dataset that is all zeroes, all ones, or all some specified constant value. It is most often used to create a dataset that is mostly zeroes except for one or more ``spikes'' of unit magnitude. Beware the FORTRAN-style notation: the first element is numbered 1, not 0, as it would be for most other SEPlib programs.

Stack
Sum a dataset over the intermediate (2) axis.

Stoltt
Stolt migration and diffraction (also does the conjugate, transpose, and inverse of Stolt migration).

Stretch
A general t-squared x-squared stretching and conversion program that is usually called under one of the aliases NMO, Unmo, Radnmo, Radial, or Stoltt.

Sunpen
The unsupported vplot ``pen'' filter for Sun's defunct Suntools window system.

Swab
Do byte-swapping appropriate for converting native 4-byte numbers between byte-swapped and normal machines. (Reorders the bytes 1-2-3-4 to 2-1-4-3.) Swab is its own inverse. (Note Swab does not claim to convert from, say, VAX native floating point to IEEE. It just swaps bytes... although that alone will usually get you within a constant scale factor, which is usually good enough.)

Ta2vplot
Input a SEPlib raster (esize=1) dataset and output vplot commands for a two-dimensional raster plot of the data. (The vplot output can be viewed on a screen using the program Tube, or plotted on a postscript printer using Pspen.) Ta2vplot has many, many options to specify generic plotting things such as where to position the plot on the page, how big to make the plot, which way to draw the axes, where to place tick marks and labels, etc, etc, etc. All of these parameters attempt to default reasonably. There are also several options unique to Ta2vplot to control things such as orientation of the raster and what color table to use (user-specified color tables are allowed). Ta2vplot also accepts esize=3 input which it interprets as (R,G,B) byte-deep triples. This option is most useful for plotting raster that is meant to have a ``multidimensional'' color table. (Warning: the esize=3 option is very slow if used with the standard linear Movie-style color tables, although it does work. esize=3 input is really meant to be used with ``RGB'' color tables.) You may find the utility programs Window and Reverse useful for pre-processing data to be plotted with Ta2vplot. See also Vppen and Box for a crude way of adding annotation.

Taplot
A synonym for Byte.

Tekpen
The vplot ``pen'' filter for Tektronix 4010 emulators.

Thplot
Pseudo three-dimensional hidden-line plotting program.

Tpow
Multiply each element of a seismogram by time raised to a given power. (The dimension associated with the fast (1) axis is assumed to be time.) A power of 2 often seems to be a good one for balancing the early and late time of a seismogram without the loss of amplitude information and other annoying problems associated with automatic AGC. (By default Tpow attempts to find a good default value for the time-power parameter automatically. Unfortunately the routine that does this has been broken by a careless programmer and currently always core dumps; for now (mid 1992) you must specify the tpow yourself.)

Transp
Transpose two of the three dimensions of a SEPlib data cube. (An option lets you select which two.)

Triconv
Convolve the input with a triangle filter along both the fast (1) and intermediate (2) axes. You should specify the width of the triangle; the default is a spike (and so the default output is just the same as the input).

Tube
The generic vplot ``pen'' filter for screen devices. (In reality it's just a csh script that calls the appropriate pen filter for your device by searching case-by-case for the value of your TERM environment variable in a switch.) The ``pen'' manual page gives a canonical list of device-independent Tube (and tube) options. Additional options may apply, depending on which pen filter Tube calls.

Unmo
The pseudoinverse of the program NMO (standard Normal MoveOut correction via linear interpolation). Make sure to specify a reasonable velocity for it to use!

Velan
Velocity analysis of common-midpoint gathers.

Vppen
The vplot ``pen'' filter for the virtual vplot device. This program is widely used to do various utility sorts of transformations on vplot files. It can be used to automatically center and size vplot files, to report statistics, rotate, scale, shift, fatten, thin, scale text, scale dash patterns, etc, etc, etc. It can also be used to combine multiple vplot files in various ways. For example it can overlay one vplot file on top of another, combine them as successive frames in a single file, or most usefully combine multiple plot frames into one superplot by arranging the individual subplots in a grid. As you can guess, Vppen has a frightening number of options; they are enumerated with some explanation in both the vppen and pen man pages. (These man pages are at least current and complete, though some people have claimed that they are just too dense and wordy to be usable.) See also vppen (lower case), plas, pldb, and the vplot manual pages (vplot, pen, vplottext, vplotraster, libvplot).

Vslan
Does slant stacking, transpose slant stacking, and the least-squares inverse of slant stacking and transpose slant stacking. The slant stack domain can be in either terms of ray-parameter ``p'' and frequency ``$\omega$'', or ray-parameter ``p'' and reduced time ``tau''.

Wavelet
Wavelet generation program; used by modeling programs as input to provide a source time function. Beware the dreaded ``echo'' bug that can occur if the output time duration is too much longer than the duration of the wavelet. (After the wavelet is zero and should remain forevermore zero, a new scaled-down copy of the wavelet fires off again.)

Wiggle
Inputs a real-valued (esize=4) dataset and outputs vplot commands for a geophysical-style wiggle plot of the data. (The vplot output can be viewed on a screen using the program Tube, or plotted on a postscript printer using Pspen.) Wiggle has many, many options to specify how closely to pack the plot traces, how much to overlap the wiggles, whether to fill under the positive excursions, where to position the plot on the page, how big to make the plot, which way to draw the axes, where to place tick marks and labels, etc, etc, etc. All of these parameters attempt to default reasonably, although Wiggle can behave stupidly if the input data is constant or consists mostly of zeroes. In such cases you may have to set the clip value yourself. You may find the utility programs Window and Reverse useful for pre-processing data to be plotted with Wiggle. See also Vppen and Box for a crude way of adding annotation. Also see the related program Dots, which is superior to Wiggle for some applications.

Window
Window out a portion of a dataset. This includes dropping elements from the beginning or end of an axis (or both); it also includes decimation. The beginning and ending elements can be specified in terms of physical units (dependent on the ``o'' and ``d'' parameters of the axis) or in terms of element number. Note Window, like most SEPlib programs, uses ``C'' style numbering: the first element is numbered 0, not 1 as may seem natural to you if you grew up on FORTRAN. Beware the special-case behavior of Window if one of the axes is reduced to length 1: it automatically does a transpose to shift unit-length axes to the end. This behavior is usually desirable, but can be an unpleasant surprise if unexpected. (If not desired there is an option to turn it off.) Unlike most SEPlib programs, Window understands four-dimensional datasets.

X11movie
An interactive ``movie'' program for X11 windows. Input should be byte-deep (esize=1) raster. It associates a color table with this raster and rapidly animates it frame by frame (stepping down the slow (3) axis) on the X11 display. A variety of other animation formats are available as well. There is no attempt at such niceties as axes, although there is a primitive facility for frame-dependent labels. Note you have to put the mouse in the X11movie window to get the right colors, but you have to move the mouse out of the window for X11movie to accept your interactive keyboard commands. This program is great when it works, the fastest animator around. It also works surprisingly well over slow and distant network connections that cause most other interactive programs to crash. If X11movie should leave your screen ``hung'' (happens fairly often, unfortunately) you will find that the ``reset'' command will almost always fix it. Note: while X11movie is included among the distributed SEPlib software sources, by default it is neither compiled nor installed.

X11pen
An old vplot ``pen'' filter for X11. Xtpen is preferred.

Xtpen
The vplot ``pen'' filter for the MIT X toolkit. One of the snazziest vplot filters around, but still under active development (as of mid 1992).

Xvpen
The vplot ``pen'' filter for Sun's Xview. Xtpen is preferred.


previous up next print clean
Next: Useful non-SEPlib programs Up: MACHINE-SPECIFIC ENVIRONMENT Previous: Xtex under OpenWindows
Stanford Exploration Project
11/18/1997