NAME

     phzpik  - compute and apply surface consistent  phase  rota-
     tions and corrections


SYNOPSIS

     phzpik [ -Nntap ] [ -Omtap  ]  [  -Totap  ]  [  -Stnam  ]  [
     -tstrtstr  ]  [  -tstptstp  ]  [ -dspdamp1 ] [ -drpdamp2 ] [
     -swiswd ]  [  -msmshft  ]  [  -isedised  ]  [  -nitnit  ]  [
     -scltisrcscl ] [ -V ] [ -? ]


DESCRIPTION

     phzpik computes and applies  a  set  of  surface  consistent
     phase rotations and phase rotation corrections for each shot
     and receiver point.  The aim is to provide  corrections  for
     source  and receiver induced phase distortions along a line.
     The aim is not to do a static correction..  It is assumed an
     initial  pass  of statics has been already done and that the
     "solution" is close.  If this is not the  case  than  phzpik
     will quickly get "lost" and its solution will diverge.

     Plan on running a  good  pickusp/scorusp  before  hand.  Any
     elevation  statics  should also be applied.  After a pass of
     phzpik a modified rerun of pickusp/scorusp  should  be  con-
     sidered  as  those  programs should work better if the phase
     distortions have been removed.  The same hold true for velo-
     city analysis.

     phzpik operates on a set of traces sorted  to  CMP  gathers.
     Phase  rotations  are  computed  by taking crosscorrelations
     between traces in common shot and receiver gathers  and  the
     corresponding  stack  traces  from  a  test stack (reference
     trace), and the auto correlation of the reference trace  and
     using  a  spectral  division  method to compute the constant
     phase difference between the  auto-  and  crosscorrelations.
     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
     phase rotated using each newly computed phase rotation,  and
     the  test  stack  is  then updated using these phase shifted
     shifted traces.  An L1 (median) back projection algorithm is
     used  to find the updates for each of the phase shifts.  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 phase shifts) is used to impose this  smoothness
     constraint. A user adjustable trade-off parameter is used to
     weight the affects of model smoothness  versus  minimization
     of  the  least  absolute  deviation (minimum L1 norm) of the
     crosscorrelation maximum lags. In order  to  prevent  serial
     correlation  of  errors  in the phase-shift estimates (which
     will cause the solution to become stuck at "local  minimum")
     the  order  in  which  shot  and  receiver  phase shifts are
     estimated is chosen at random.  One iteration of  the  algo-
     rithm  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 a strong influence on the outcome of the cal-
     culation. One should be careful to pick a time  window  with
     the  best  data quality, both in the stack and prestack. The
     penalty for using a larger window (which  will  average  the
     crosscorrelation  over  more samples and, if data quality is
     adequate, will give more  reliable  solutions)  is  slightly
     longer  run  time.  The  test stack time window will also be
     used as a window to normalize the RMS amplitude of the input
     traces.

     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 phase shifts
     versus the smoothness of either the shot point  or  receiver
     point phase corrections. The parameters specify the fraction
     of the second derivative that is subtracted from  the  phase
     shift computed from the auto/crosscorrelations.  If the ini-
     tial phase shift estimates are all zero (which they are, see
     next  paragraph)  then  the following conditions 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 reasonable to assume  that  the
     phase  shifts  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 phase shift
     will be zero (The smoothness is at a maximum).  In  general,
     smoothing parameters should be between 0.0 and 0.5.

     An implicit assumption in the algorithm  used  is  that  the
     average phase shift is zero (as is the initial phase shift).
     Therefore, one should apply any terrain statics or  redatum-
     ming corrections before using phzpik.

     All phase rotation estimation algorithms are susceptible  to
     velocity  analysis  problems.  If the reflection events have
     not been properly flattened the phase shifts  computed  will
     be  biased.  If a velocity analysis problem is suspected, it
     would be best to run this program for a few iterations  (say
     5) and then repeat the velocity analysis and moveout correc-
     tion operations. Using a test stack time window at a  deeper
     level  may  help  with velocity problems, since moveout gen-
     erally decreases with depth.

     phzpik prints the stack semblance at the start of  the  pro-
     cess  and  at each iteration, as well as the phase rotations
     in degrees computed for each  shot  and  receiver  point  to
     printout file. This diagnostic information is very important
     in assessing the  performance  of  phzpik.  The  affects  of
     changing  program  parameters  can  be objectively 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  semblance  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 phzpik 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,  sem-
     blance  decreases  throughout  the entire process this indi-
     cates that phzpik has failed entirely.  There  are  generaly
     two  reasons for such a failure.  First, the data may be too
     noisey. Additional processing to remove coherent  noise  may
     help.  Second,  the  phase  shifts along the line may be too
     large for phzpik. In this case  applying  elevation  statics
     and/or  statics derived by standard A means, such as refrac-
     tion statics, may help. In either case,  changing  the  time
     window  of  the test stack or increasing the spatial smooth-
     ness parameters may help. An examination  of  the  shot  and
     receiver  phase corrections may help to diagnose these prob-
     lems. If the  problem  is  caused  by  noise,  the  shot  or
     receiver phases may appear to be fairly random spatially. If
     the problem is caused by very  large  phase  rotations,  the
     shot  and  receiver  phase shifts may appear to have spatial
     discontinuities in them where  the  phase  changes  abruptly
     (ie.  from  a large negative to large positive value). These
     discontinuities are know as cycle skips. Note that  even  if
     there is not a problem with the estimated phase shifts, some
     discontinuities may appear in the phase corrections.

     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 in  and
     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 phase shifts computed independently for each
     segment  of  a  line  will  not  be compatible, resulting in
     "tears" in the stack. This  is  especially  true  since  the
     phase  shifts  computed near the ends of lines (or line seg-
     ments) 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 with moveout correction applied.   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 )


     -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
          phase  shifts  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.25 )

     -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.25 )

     -sw iswd
          Trace header word to store final phase  rotation  value
          (degrees).  Default = 1

     -ms mshft
          The maximum allowed correlation lag (ms).  +/-mshft  Be
          careful  not to set this parameter to too small a value
          as this will over constrain the solution, especially on
          long  lines  where the total phase shift is expected to
          be large.  (default = 100 ms )

     -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 phzpik 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 phase  corrections  applied
          to the data.  (default = 10 )

     -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 )

     -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,  phzpik  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 phase  shifts  at  adjacent
     shot  and  receiver  points,  since  the bookkeeping to find
     adjacent points is not in the program. This would be  useful
     with Vibrosise data.

     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