NAME

     shave  - routine  to  perform  adjacent  shot  averaging  to
     replace  shot independant coherent noise such as would occur
     with another seismic  source  detonating  during  recording.
     The  replacement  is done by averaging adjacent shot records
     over a zone of common subsurface coverage.


SYNOPSIS

     shave [ -Nntap ] [ -Ootap ] [ -Sstap ] [ -Xxtap ] [ -sist  ]
     [  -eiend ] [ -rsnrst ] [ -renred ] [ -ampamp ] [ -threshamp
     ] [ -gigint ] [ -sisint ] [ -cableicab ]  [  -hwShtWrd  ]  [
     -lagilag ] [ -mute ] [ -nopower ] [ -?  or  -h or  -help ]


DESCRIPTION

     shave operates in one of two modes depending on your prefer-
     ence.   You  may  either  supply an XSD header value at pick
     location file of all record locations to be averaged or  you
     may  execute shave in autodetect mode.  Autodetection is the
     default if no XSD file is attached.

     In manual mode  [with  an  XSD  file  attached]  shave  will
     operate  only  on  the  indicated records.  This file may be
     created by picking at least one pick on each record you wish
     to  operate  on  and then using the save trace header option
     under file in xsd to output this file.  Be  sure  to  detect
     the mnemonic of interest when building this file.

     In autodetect mode [the  default]  a  three  record  rolling
     filter  is  moved  across  your data.  The central record is
     compared to it's neighbours and if  found  to  be  anomalous
     will  be operated on.  The algorithm used to determine same-
     ness is to first form three sets of autocorrelations A1,  A2
     and  A3,  one for each record in the rolling buffer.  Within
     each record the following process is used to form the  auto-
     correlation  result.  First an autocorrelation is calculated
     over the user defined window for every  10th  trace  in  the
     record  [if this is not appropriate for your data you better
     contact the author as this is not currently a  command  line
     variable].  These are then summed together and normalized by
     the total number involved.  The resulting summed  autocorre-
     lation  is  then  normalized  by the zero lag value and then
     squared [unless -nopower is present on  the  command  line].
     Once   calculated   for  all  three  records  the  following
     crosscorrelations are calculated:
      C12 = A1 X A2
      C13 = A1 X A3
      C23 = A2 X A3 The amplitude of the zero  lag  samples  from
     the  above  crosscorrelations  are  compared.   When  C13 is
     greated that both C12 and C23 we have a situation where  the
     middle  record  looks  significantly different than the sur-
     rounding pair.   If  the  average  amplitude  difference  is
     greater  than  a  user  defined threshold [-thresh] then the
     record is flagged for replacement.

     Once detected, either automatically or manually, an estimate
     of  which  traces from the three records cover a common area
     of the subsurface is  made.   This  is  possible  using  the
     geometric  relationship  defined by the command line entries
     of the number of channels on a  cable  and  shot  and  group
     intervals  [Though  potentially  useful  for  other types of
     data, this routine is  theoretically  sound  only  for  shot
     sorted input]. A user defined window of data is removed from
     the central record and replaced  by  the  summation  of  the
     appropriate  traces  from  the  adjacent records.  A command
     line option [-amp] to allow a  percentage  add-back  of  the
     central record is available.  Traces from the central record
     not common to the adjacent  records  are  muted  within  the
     operational window.  A 10 sample ramp is used at the top and
     bottom of the window to minimize the abrupt character change
     that  would  occur due to random noise attenuation resulting
     from the stacking process.  Over this  ramp  data  from  all
     three  records  is  used for a smoother result.  An optional
     mute flag [-mute] is supplied which if used will result in a
     surgical  mute  being  applied to the traces that were muted
     within the window.  The onset time for this mute  is  stored
     in  the  trace  header slot VPick2 so that if necessary this
     mute may be restored in the future using  mute -R .

     shave gets both its data and  its  parameters  from  command
     line  arguments.  These arguments specify the input, output,
     the design window, the start and end records, the percentage
     amplitude add-back for the central record, the autodetection
     threshold amplitude, the group  and  source  intervals,  the
     number  of traces per streamer [necessary for multi-streamer
     acquisition, the XSD header value at pick location file name
     if  used,  the  trace header mnemonic to use in the routine,
     the number of lags in the autocorrelation, and the  surgical
     mute application flag.

  Command line arguments
     -N ntap  [default: stdin]
          Enter the input data set name or file immediately after
          typing -N unless the input is from a pipe in which case
          the -N entry must be omitted. This  input  file  should
          include the complete path name if the file resides in a
          different directory.  Example -N/b/vsp/dummy tells  the
          program to look for file 'dummy' in directory '/b/vsp'.

     -O otap  [default: stdout]
          Enter the output data  set  name  or  file  immediately
          after  typing -O. This output file is not required when
          piping the output to another process. The  output  data
          set also requires the full path name (see above).

     -S stap  [default: not used]
          Enter the output  statistics  data  set  name  or  file
          immediately after typing -S. This output file will con-
          tain information about the  user  defined  window,  the
          autodetection  threshold  used  as  well  as a complete
          listing of shot mnemonic and threshold value for  every
          occurance   where  the  C13  zero  lag  amplitude  [see
          description above] is greater than both the C12 and C23
          zero  lags  values.   A listing of the record mnemonics
          for each record averaged and totals for the  above  are
          also  provided.   This information is duplicated in the
          printout  file  so  generation  of  this  file  is  not
          strictly   necessary.    It   is  however  useful  when
          parameterizing a multi-shave application.

     -X xtap  [default: autodetect mode]
          Enter the XSD header value at pick location  file  name
          containing a pick on each record to be operated on.  If
          this entry is not present shave will operate  in  auto-
          detect  mode using the algorithm described above.  This
          file may be created by picking at  least  one  pick  on
          each  record  you wish to operate on and then using the
          save trace header option under file in xsd output  this
          file.   Be sure to detect the mnemonic of interest when
          building this file.  The -hw entry below may be used to
          indicate which mnemonic you used.

     -hw ShtWrd  [default: RecNum]
          Enter the trace header mnemonic to be used in the  rou-
          tine.  If an XSD file is attached this must be the same
          mnemonic as used in that file.  In autodetect mode this
          entry  only  serves  to define the mnemonic used in the
          statistics file [see -S above].

     -rs nrst  [default: 1]
          Enter start record number.

     -re nred  [default: last record]
          Enter end record number.

     -amp amp  [default: 0.0]
          Enter the percent of the  central  record  to  add-back
          into the averaged result.  The default is to completely
          remove the record from the  operational  window.   Some
          people prefer to see a certain percentage of the origi-
          nal record retained in the  result.   For  conventional
          marine datasets the default is adequate.

     -thresh amp  [default: 0.1]
          Enter the autodetection threshold above  which  records
          will  be  flagged  for  averaging.  If you have no idea
          what to put here simply  run  a  sample  of  your  data
          through  the  process and examine the output statistics
          to see what type of threshold value is associated  with
          your  particular noise problem.  The default is of very
          little use as the threshold value useful for your  data
          will be different from most everyone else's.

     -gi gint  [default: 12.5]
          Enter the acquisition group interval in  the  units  of
          your dataset.

     -si sint  [default: 25.0]
          Enter the acquisition source interval in the  units  of
          your dataset.

     -cable icable  [default: 160]
          Enter the number of traces per  cable  for  multi-cable
          shot records.  Even if you have a single cable acquisi-
          tion system you must  still  correctly  fill  out  this
          information.    This  information  allows  the  correct
          placement of the subsurface common zone of illumination
          between adjacent records.

     -lag ilag  [default: 100]
          Enter the number of autocorrelation lags to use in cal-
          culation  of  the  A1,  A2 and A3 autocorrelations.  It
          will be necessary to reset this value if you are  using
          an operational window of less than 100 samples.

     -mute
          Enter the command line  argument  '-mute'  to  activate
          surgical  mute  application.   If  present  shave  will
          search each appropriate trace in the  detected  records
          for  the presence of muting within the operational win-
          dow [as will occur near the far and near offsets of the
          spreads].   If  detected  the  mute  onset time will be
          recorded in the VPick2 header location for later  reap-
          plication  if  necessary.  The mute will be extended to
          the end of the trace making restoration using  mute  -R
          possible [as with a standard surgical off-mute].

     -nopower
          If present the autocorrelation data will not be squared
          prior  to cross correlation.  If you find that shave is
          detecting incorrect records for replacement  this  flag
          may solve your problem.  Depending on the nature of the
          offensive shot sometimes a power  estimate  works  best
          and sometimes not.

     -? or -h or -help
          Enter the command line argument '-?'  ,  -h  or   -help
          to  get  online help.  The program terminates after the
          help screen is printed.


DISCUSSION

     This routine was created to handle the pathologic  situation
     of  another  boat  shooting in the area of a marine acquisi-
     tion.  For whatever reason time  sharing  was  not  imployed
     resulting  in two sources on most of the data recorded.  The
     cycle times on the two crews  was  such  that  the  unwanted
     source  would  arrive  progressively later [~800 ms] on each
     record.  The amplitude of the unwanted signal was very small
     with  respect to the data above about 2 seconds.  The direct
     arrivals however were of much  greater  amplitude  than  the
     data  from  4  to  6  seconds.  Luckily the next shot had no
     secondary source as the other crew was  cycling  their  guns
     during  that  shot.  The previous record, though polluted by
     another shot contained extraneous shot energy of  very  very
     low  amplitude.  Averaging the two shots over a zone of com-
     mon subsurface coverage allowed us to restore a semblance of
     the  correct shot to the zone of the offending first breaks.
     The shave routine was run  as  follows  to  catch  all  sets
     unwanted first breaks in the data:

      ttothen -exp2.25 |
      shave -s2000 -e3400 -thresh0.02 -Sshavestats_2000_3400 |
      shave -s3200 -e4000 -thresh0.03 -Sshavestats_3200_4000 |
      shave -s3950 -e4800 -thresh0.04 -Sshavestats_3950_4800 |
      shave -s4750 -e5500 -thresh0.05 -Sshavestats_4750_5500 |
      shave  -s5200  -e6000  -thresh0.06   -Sshavestats_5200_6000
     -mute


     Though written with the shot domain in  mind,  this  routine
     would  serve  to  isolate and remove any anomalous signal in
     any other type of dataset providing  the  data  in  adjacent
     records was presented in a similar fashion.


BUGS

     unknown.


SEE ALSO

      tfskill(1), trstat(1), clean(1)


AUTHOR

     P.G.A. Garossino, 3932[socon 422], TRC


COPYRIGHT

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






Man(1) output converted with man2html