DOCUMENTATION
SYNOPSIS
PERL PROGRAM NAME: UNISAM - UNIformly SAMple a function y(x) specified as x,y pairs
AUTHOR: Juan Lorenzo (Perl module only)
DATE:
DESCRIPTION:
Version:
USE
NOTES
Examples
SEISMIC UNIX NOTES
UNISAM - UNIformly SAMple a function y(x) specified as x,y pairs
unisam xin= yin= nout= [optional parameters] >binaryfile
... or ...
unisam xfile= yfile= npairs= nout= [optional parameters] >binaryfile
... or ...
unisam xyfile= npairs= nout= [optional parameters] >binaryfile
Required Parameters:
xin=,,, array of x values (number of xin = number of yin)
yin=,,, array of y values (number of yin = number of xin)
... or
xfile= binary file of x values
yfile= binary file of y values
... or
xyfile= binary file of x,y pairs
npairs= number of pairs input (active only if xfile= and yfile=
or xyfile= are set)
nout= number of y values output to binary file
Optional Parameters:
dxout=1.0 output x sampling interval
fxout=0.0 output first x
method=linear =linear for linear interpolation (continuous y)
=mono for monotonic cubic interpolation (continuous y')
=akima for Akima's cubic interpolation (continuous y')
=spline for cubic spline interpolation (continuous y'')
isint=,,, where these sine interpolations to apply
amp=,,, amplitude of sine interpolations
phase0=,,, starting phase (defaults: 0,0,0,...,0)
totalphase=,,, total phase (default pi,pi,pi,...,pi.)
nwidth=0 apply window smoothing if nwidth>0
sloth=0 apply interpolation in input (velocities)
=1 apply interpolation to 1/input (slowness),
=2 apply interpolation to 1/input (sloth), and write
out velocities in each case.
smooth=0 apply damped least squares smoothing to output
r=10 ... damping coefficient, only active when smooth=1
Author: Dave Hale, Colorado School of Mines, 07/07/89
Zhaobo Meng, Colorado School of Mines,
added sine interpolation and window smoothing, 09/16/96
CWP: John Stockwell, added file input options, 24 Nov 1997
Remarks: In interpolation, suppose you need 2 pieces of
sine interpolation before index 3 to 4, and index 20 to 21
then set: isint=3,20. The sine interpolations use a sine
function with starting phase being phase0, total phase
being totalphase (i.e. ending phase being phase0+totalphase
for each interpolation).
CHANGES and their DATES
sub Step
collects switches and assembles bash instructions by adding the program name
sub note
collects switches and assembles bash instructions by adding the program name
sub clear
sub amp
sub dxout
sub fxout
sub isint
sub method
sub nout
sub npairs
sub nwidth
sub phase0
sub r
sub sloth
sub smooth
sub totalphase
sub xfile
sub xin
sub xyfile
sub yfile
sub yin
sub get_max_index
max index = number of input variables -1