NAME

     hthresh  - generates a record constant  amplitude  threshold
     consumate  with  a user defined percentage of area under the
     amplitude histogram curve and installs said threshold  in  a
     user  defined  trace  header  slot.  Keywords: swt1d wavelet
     coefficient noise suppression localized in time and space


SYNOPSIS

     hthresh [ -Nntap ] [ -Ootap ] [ -sist ] [ -eiend ] [ -rsnrst
     ]  [  -renred ] [ -hwrscalar ] [ -nbinsnbin ] [ -minrmin ] [
     -maxrmax ] [ -pctrpct ] [ -V ] [ -?  or  -h ]


DESCRIPTION

     hthresh : creates an  amplitude  histogram  of  input  data,
     record  by  record.   The  number  of  bins  and min and max
     ampltudes to  consider  are  command  line  parameters  with
     defaults being derived from the data.  Once formed a running
     sum is generated from the origin to  the  maximum  magnitude
     [negative  amplitudes  are  not  considered].  The magnitude
     associated with the user specified percent of the area under
     the  curve  is identified and placed in the designated trace
     header location in the output data  stream.   For  practical
     purposes this should be a floating point header slot.

     hthresh gets both its data and its parameters  from  command
     line  arguments.  These arguments specify the input, output,
     the design window, start  and  end  records,  the  threshold
     trace header mnemonic, the number of bins to use in the his-
     togram, the minimum and maximum value to contribute  to  the
     histogram,  the  percentage  of  the area under the curve to
     correspond to the threshold amplitude and verbose  printout,
     if desired.

  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 ist  [default: 0 ]
          Enter the start time to consider in the histogram  con-
          struction.   All data is passed, data from below -s and
          above -e will be  considered  in  construction  of  the
          histogram.

     -e iend  [default: last sample on trace]
          Enter the end time to consider in  the  histogram  con-
          struction.   All data is passed, data from below -s and
          above -e will be considered in construction of the his-
          togram.

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

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

     -hw cHdrWrd  [default: Horz05]
          Enter the mnemonic of the trace  header  slot  used  to
          store the calculated threshold in the output dataset.

     -nbins nbins  [default: 2500]
          Enter the number of bins to consider in  the  construc-
          tion  of  the histogram.  The internal array associated
          with this parameter is dynamically allocated so you can
          have as many bins as your computer memory will support.

     -min rmin  [default: from data]
          Enter the minimum amplitude to consider in  the  histo-
          gram  construction.   The default is to use the minimum
          amplitude found in the  data  record  considered.   The
          default is then record variable.

     -max rmax  [default: from data]
          Enter the maximum amplitude to consider in  the  histo-
          gram  construction.   The default is to use the maximum
          amplitude found in the  data  record  considered.   The
          default is then record variable.

     -pct rpct  [default: 97.25]
          Enter the percentage of the area under the curve  [from
          the  origin to the max amplitude] to associate with the
          threshold.

     -V   Enter the command line argument '-V' to get  additional
          printout.

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


DISCUSSION

     This routine was written to support tresholding  of  wavelet
     coefficients  by  scale  [program  wfilter].   It  was found
     heuristically that the area under  the  wavelet  coefficient
     amplitude  histogram curve was related to the overall S/N of
     the problem dataset.  Threshold  amplitudes  associatd  with
     various  positions  along  the  running summation under this
     curve provided a consistent level of noise suppression.   An
     optimum level was found at 97.25 percent of the maximum run-
     ning sum.


BUGS

     unknown


SEE ALSO

      swt1d(1) wfilter(1) ahist(1)


AUTHOR

     P.G.A. Garossino [USP]

          copyright 2001, Amoco Production Company
                   All rights reserved
             an affiliate of BP America Inc.

































Man(1) output converted with man2html