NAME

     ampcor  - compute and apply surface gain corrections


SYNOPSIS

     ampcor [ -Nntap ] [ -Omtap  ]  [  -Totap  ]  [  -Stnam  ]  [
     -tstrtstr  ]  [  -tstptstp  ]  [ -dspdamp1 ] [ -drpdamp2 ] [
     -isedised ] [ -nitnit ] [ -scltisrcscl ] [ -A ] [ -R ] [  -M
     ] [ -V ] [ -? ]


DESCRIPTION

     ampcor computes and applies a set of surface consistent gain
     corrections for each shot and receiver point.  The aim is to
     provide corrections for source and receiver  induced  ampli-
     tude distortions along a line.

     ampcor operates on a set of traces sorted  to  CMP  gathers.
     Gain  corrections  are  by   computing  the  gains  for each
     gather, shot and receiver, and then applying this correction
     to the gather.  A new reference stack is then computed after
     each pass.  The user must specify the time window  in  which
     the test stack is made.  The algorithm is fully nonlinear in
     the sense that traces in the common shot or receiver  gather
     are  gain  corrected  using each newly computed gain factor,
     and the test stack is then  updated  using  these  corrected
     traces.  An L1 (median) back projection algorithm is used to
     find the updates for each of the gain corrections.   The  L1
     norm  is  used  since  experience shows that the maximum lag
     values  of  the  crosscorrelation  can   have   considerable
     scatter. The L1 norm is robust agains the adverse affects of
     these "outlying" lag values.  The model  parameters  can  be
     constrained  to  give a spatially smooth solution. A penalty
     function (which is the second spatial derivative of the shot
     or receiver gain corrections) is used to impose this smooth-
     ness constraint. A user adjustable  trade-off  parameter  is
     used to weight the affects of model smoothness versus minim-
     ization of the least absolute deviation (minimum L1 norm) of
     the  crosscorrelation  maximum  lags.   One iteration of the
     algorithm is defined as operating on each shot and  receiver
     point one time.

     The selection of the time window in which the test stack  is
     made  can  have  an influence on the outcome of the calcula-
     tion. One should pick a time window with the best data qual-
     ity, both in the stack and prestack.

     The use of the spatial  smoothing  constraint  requires  the
     specification  of  two tradeoff parameters. These parameters
     specify the relative amount of weight that is given  to  the
     minimum  absolute deviations of the maximum gain corrections
     versus the smoothness of either the shot point  or  receiver
     point  gain corrections. The parameters specify the fraction
     of the second derivative that is subtracted  from  the  gain
     correction  computed  from the gather.  The following condi-
     tions hold: 1) if the  parameter  is  set  to  zero  spatial
     smoothness  is  neglected  (This  might be useful if shot or
     receiver points were quite far apart, so that it is not rea-
     sonable  to  assume that the gain corrections at neighboring
     points are correlated), 2) if the parameters are set to  0.5
     the  weights  are  equal and 3) if the parameters are set to
     1.0 the estimated gain corrections will be zero (The smooth-
     ness  is  at  a  maximum).  In general, smoothing parameters
     should be between 0.0 and 0.5.   ampcor.  prints  the  stack
     semblance at the start of the process and at each iteration,
     as well as the gain corrections computed for each  shot  and
     receiver point to printout file. This diagnostic information
     is very important in assessing the  performance  of  ampcor.
     The  affects  of  changing  program parameters can be objec-
     tively judged by noting the change in the stack semblence at
     the  end  of the processing.  A positive change in semblance
     indicates that the processing was more successfull. If  sem-
     blance  has  remained close to constant for the last several
     iterations of the algorithm this indicates  convergence.  If
     convergence does not appear to have been achived, run ampcor
     again specifying more iterations.  Since  the  mapping  from
     phase  shifts to stack power is quite nonlinear it is normal
     that semblance may decrease at some iterations. If  however,
     semblance decreases throughout the entire process this indi-
     cates that ampcor has failed entirely. Generaly  the  reason
     for such a failure is that the data may be too noisey. Addi-
     tional processing to remove coherent noise may help.

     This program performs complex bookkeeping operations so that
     common  shot  and receiver gathers can be extracted from the
     CMP gather file. Because of this bookkeeping, piping out  of
     this   program   may  lead  to  bizarre  and  unpredicatable
     behavior. Further, if you do not want to  work  on  a  whole
     line  at once you should use editt to select the records and
     traces to be  used  before  the  sort  table  is  made  with
     presort. Operating on a full line should give a better solu-
     tion since the number of traces at each  shot  and  receiver
     point  will  be  the  maximum  possible. Further, there is a
     chance that the gain corrections computed independently  for
     each  segment of a line will not be compatible, resulting in
     "hot spots" in the stack. This is especially true since  the
     gain  corrections  computed  near the ends of lines (or line
     segments) are less reliable since the number  of  traces  at
     each shot and receiver point will be fewer than the maximum.

  Command line arguments
     -N ntap
          Enter the full path name of  the  file  containing  the
          data  set.   The data must be sorted in common midpoint
          gathers.  NMO need not be applied.   The  program  will
          give  an  error  message  if  the  input  file  is read
          protected.  If no  input  file  is  given  the  program
          assume input from a pipe.  (default = No Default )


     -O mtap
          Enter the full path name for the output file. The  out-
          put file will be in the form of common midpoint gathers
          with  the  estimated  phase   corrections   corrections
          applied.  This  file  cannot be sent to standard output
          since the traces are read in a random order as the gain
          corrections  are  estimated  and  applied.   NOTE:  The
          traces in the output file will have been RMS  amplitude
          normalized  using the test stack time window.  The pro-
          gram will give an error message if the output  file  is
          being written to a write protect directory.  (default =
          No Default )


     -T otap
          Enter the full path name of the file that is to contain
          the  test stack. The program will give an error message
          if the output file is being written to a write  protect
          directory.  (default = No Default )


     -S tnam
          Enter the full path name of the sort table produced  by
          the  usp  program  presort.  Presort must be run on the
          file specified as input. Beware;  the  ability  of  the
          program to detect errors in the sort table (ie. using a
          table that was made for a file that is not  in  exactly
          the same format as the one specified as input) is quite
          limited.  The program will give an error message if the
          input  file  is  read  protected.   If no input file is
          given the program will hang.  (default = No Default )


     -tstr tstr
          The start time of the test stack. This time must be  at
          least  mshft (maximum time shift) from the start of the
          input trace.  (default = No Default )

     -tstp tstp
          The end time of the test stack. This time  must  be  at
          least  mshft  (maximum  time shift) from the end of the
          input trace.  NOTE: Since each data set  is  different,
          and  since  selection  of the test stack time window is
          critical to the success of this  process,  no  defaults
          are possible for tstr or tstp (default = No Default )

     -dsp damp1
          The spatial smoothness constraint  parameter  for  shot
          points.  This parameter should generally be set between
          0.0 and 0.5, and must always be less  than  1.0.  NOTE:
          See  the  explanation of this parameter in the Descrip-
          tion section above.  (default = 0.0 )

     -drp damp2
          The  spatial  smoothness   constraint   parameter   for
          receiver points. This parameter should generally be set
          between 0.0 and 0.5, and must always be less than  1.0.
          NOTE:  See  the  explanation  of  this parameter in the
          Description section above.  (default = 0.0 )

     -ised ised
          The seed for the random number generator used to deter-
          mine  the  order  in which shot and receiver points are
          operated on. If ampcor is to be used on the  same  line
          several  times (say following velocity analysis), it is
          a good idea to change ised so that  serial  correlation
          of  errors  from  one  application  of  the  process to
          another will be reduced.  (default = 1256 )

     -nit nit
          The number of iterations of gain corrections applied to
          the data.  (default = 2 )

     -scl isrcscl
          Enter the multiplier that was applied to the src  point
          #s  in  input trace header 109 (mnemonic SrcLoc).  Usu-
          ally it's been x10 to take care of fractional src point
          numbers  as  integers, but it could be some other scale
          factor (e.g. 2).  The reason being is that with  a  x10
          multiplier  source  point #s reach 32767 (the limit for
          short integers) in long marine lines so one must use  a
          smaller   multiplier   to   preserve  fractional  sp's.
          Chances are if this limit  was  reached  presort  would
          have failed with an appropriate message in the printout
          file.  (default = 10 )

     -A   If present on command line means the  average  absolute
          amplitude  will be used to compute the gain.. Note: for
          most data it is recommended that the median  option  be
          used.

     -R   If present on command line means the rms amplitude will
          be used to compute the gain. If none of the above flags
          are given the default is absolute  maximum.  Note:  for
          most  data  it is recommended that the median option be
          used.

     -M   If present on command line means the  median  amplitude
          will  be used to compute the gain. If none of the above
          flags are given the default is absolute maximum.  Note:
          for  most data it is recommended that the median option
          be used.

     -V   Verbose mode. All parameters from the command line  and
          line  header  and  other diagnostic information will be
          sent to standard error.

     -?   Query  mode.   With  this  flag,  ampcor  will  send  a
          description  of the command line arguments to the stan-
          dard error output and stop.


BUGS

     No trap for running program without an input file.

     There is no way to change the range  of  records  or  traces
     that  are  used  in  the processing. This would require very
     complex bookkeeping operations. Use editt before presort  to
     change the configuration of the input data file.

     There is no way to constrain the gain  corrections  at  shot
     and  receiver points, since the bookkeeping to find adjacent
     points is not in the program.

     This program is fairly slow to run since  random  trace  I/O
     must be done on the test stack and output files.


AUTHORS

     Paul Gutowski, APR, July, 1992) and  based  on  the  rstatic
     program  of  Stephen  F. Elston, Princeton University (July,
     1991).


COPYRIGHT

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


















Man(1) output converted with man2html