NAME

     ravn - apply  spatially  and  temporally  variant  amplitude
     scaling.


SYNOPSIS

     ravn [ -Nntap ] [ -Ootap ] [ -Ccoeftap ] [ -rsirs ] [ -reire
     ]  [ -wiwin ] [ -ampamp ] [ -firtype ] [ -ordorder ] [ -sor-
     dorder ] [ -iternum1 ]  [  -ilimnum2  ]  [  -sstepistp  ]  [
     -tstepjstp  ]  [ -tstartitfst ] [ -tenditlst ] [ -toptop ] [
     -G ] [ -R ] [ -nomedian ] [ -coef ] [ -V ] [ -? ]


DESCRIPTION

     ravn calculates a best fit to  the  surface  describing  the
     gain  characteristics  of  the  input record.  The algorithm
     first calculates an input gain record  using  a  median  agc
     operator.  A robust fit to this surface is calculated yield-
     ing the optimum gain surface to  be  applied  to  the  data.
     Prior  to  application the median error between the agc gain
     surface and that calculated by ravn may be  used  to  adjust
     for  anomalous  trace  amplitudes  as  would  be  caused  by
     instrumentation/coupling problems etc. This process  can  be
     iterated under parameter control.

     The program outputs either the scaled records or  gain  sur-
     faces.   Also  output  is a coefficients file containing the
     basic information neccessary to reconstruct  the  gain  sur-
     faces  used  in scaling the data.  Once this file exists the
     program may be used to apply or remove the gain  as  defined
     by these coefficients for the records specified in the file.

     ravn gets both its data and its parameters from command line
     arguments as follows:

  Command line arguments
     -Nntap  [stdin]
          Enter the input data set name or file immediately after
          typing  -N. This input put file should include the com-
          plete path name if the  file  resides  in  a  different
          directory.   Example  -N/vsp/dummy tells the program to
          look for file 'dummy' in directory 'vsp'.

     -Ootap  [stdout]
          Enter the output data  set  name  or  file  immediately
          after  typing -O. The output data set also requires the
          full path name if not in  the  current  directory  (see
          above).

     -Cctap  [RavnCoef]
          Enter the coefficient data set name or file immediately
          after typing -C. The coefficient data set also requires
          the full path name if not in the current directory (see
          above).   WARNING:  When  running  ravn  within  IKP be
          certain to use a fully qualified path to this file that
          can  be accessed by all machines in the net.  The func-
          tions will be written to the  file  referenced  to  the
          RecNum entry from the input dataset.  When using IKP it
          may be the case that these functions are  dropped  into
          the  file  out  of sequence.  Don't worry about this as
          the routine will also use RecNum to reference the  file
          upon  either  gain removal or gain application based on
          the coefficients.

     -rs irs  [1]
          First record to process.   Records  before  this  value
          will be passed unprocessed.

     -re ire  [all]
          Last record to process.  Records after this value  will
          be passed unprocessed.

     -w wind  [501]
          Length of AGC scaling window in milliseconds.

     -amp amp  [15]
          Scaling percentage for AGC calculation.

     -f irtype  [1]
          Type of function used to fit surface.
           0 = Least Squares
           1 = Robust Polynomial

     -ord order  [0]
          Maximum order of surface  to  test  during  search  for
          optimum order
           0 = determined by program
           1 - 14 = input by user

     -sord sorder  [0]
          Enter the order of surface you wish ravn  to  fit.   If
          supplied  this will be the only order of surface calcu-
          lated.  The default is to let the program determine the
          most statistically significant order to use.

     -iter num1  [0] [RUNTIME ALERT]
          Number of iterations to use in compensating for  traces
          having anomalous amplitudes.

     -ilim num2  [3] [RUNTIME ALERT]
          Number of iterations to use in robust polynomial fit of
          surface.  [RUNTIME ALERT]

     -sstep istp  [24] [RUNTIME ALERT]
          Sample decimation step size (ms) prior to surface fit.

     -tstep jstp  [1] [RUNTIME ALERT]
          Trace decimation step size (traces)  prior  to  surface
          fit.

     -tstart itfst  [1]
          First trace to use in the decimation prior  to  surface
          fit.

     -tend itlst  [Last Trace In Record]
          Last trace to use in the decimation  prior  to  surface
          fit.

     -top top  [20]
          The top percent of the record following the  shallowest
          mute  time  will be oversampled.  This may be necessary
          to supply greater significance to shallow  high  ampli-
          tude samples in some datasets.

     -G   If present, output gain surfaces.

     -R   If present,  remove  the  previously  applied  gain  as
          defined  by  the  attached  coefficients  file. (see -C
          above)

     -median
          If present construct the  gain  surfaces  using  MEDIAN
          TRACE ADJUSTMENT, must also assign  -iter  above.

     -coef
          If present construct the gain surfaces using the  coef-
          ficients found in the above coefficients file.

     -V   If present enable verbose printout.

     -? or -h
          Enter this (or '-?' if you are running in  c-shell)  to
          get online help only.


DISCUSSION

     There have been two USP notes published regarding this  rou-
     tine  with  at  least one more in the wings.  If you are not
     familiar with this routine, read the  published  notes.   If
     you  still  have questions call either of the authors listed
     below for advise.


BUGS

     unknown


AUTHORS

      April, 1993
      Michael D. Bush [London:8-822-7050:zmdb03@lon.amoco.com]
      Paul G. A. Garossino [APR:3932:zpgg07@trc.amoco.com]


COPYRIGHT

     copyright 2001, Amoco Production Company
               All Rights Reserved
          an affiliate of BP America Inc.

















































Man(1) output converted with man2html