NAME

     ahist  - produces an amplitude histogram of seismic data for
     plotting using xgraph


SYNOPSIS

     ahist [ -Nntap ] [ -Ootap ]  [  -nsnstr  ]  [  -nenetr  ]  [
     -rsnrst  ]  [  -renred  ] [ -sist ] [ -eiend ] [ -minmin ] [
     -maxmax ] [ -hw1hdrwd1 ] [ -hw2hdrwd2 ] [ -nbnb ] [ -C  ]  [
     -A ] [ -K ] [ -V ] [ -?  or  -h ]


DESCRIPTION

     ahist produces an amplitude histogram of  seismic  data  for
     plotting  using  xgraph.   Optionally produces a cumulative-
     percentage histogram as well.  Histogram can display  signed
     amplitude or absolute-value of amplitudes.  ahist uses every
     sample on every trace on every record it receives  as  input
     to  calculate  its  histograms.   Analysis can be done using
     header words and horizon in those header words.

     ahist gets both its data and  its  parameters  from  command
     line  arguments.  These arguments specify the input, output,
     the design window, the start and end traces, start  and  end
     records, and other program-specific parameters.

  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'.
          This file should contain USP-format seismic data.

     -O otap  [default: stdout]
          Enter the output file name 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).  This file will be
          ASCII format, not USP format.

     -ns nstr  [default: 1]
          Enter the start trace number.

     -ne netr  [default: last trace of record]
          Enter the end trace number.

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

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

     -s ist  [default: 0]
          Enter the desired pass data start time in milliseconds.

     -e iend  [default: time of last sample on trace]
          Enter the desired pass data end time in milliseconds.

     -hw1 hdrwd1
          Enter the header word  mnemonic  with  the  horizon  to
          start  analysis.  (Default: if not used will start with
          first sample).

     -hw2 hdrwd2
          Enter the header word mnemonic with the horizon to  end
          analysis.   (Default:  if not used will use last sample
          sample).

     -min min  [default: -2048]
          Enter the minimum amplitude to be displayed by the his-
          togram.   All  amplitudes  less than this value will be
          placed in a single bin.

     -max max  [default: 2048]
          Enter the maximum amplitude to be displayed by the his-
          togram.   All  amplitudes greated than or equal to this
          value will be placed in a single bin.

     -nb nb  [default: 32]
          Enter the number of histogram bins between min and max.
          The  size  of  each bin will be (max - min) / nb.  This
          value most be a positive integer less than 1000.

     -C   Enter the command line argument '-C' to produce a cumu-
          lative  percentage histogram of the seismic data.  This
          histogram will be placed in a file with the  same  name
          as  /fBotap/fR,  except  with  the suffix ".cum" added.
          This file can also be plotted using xgraph.  The histo-
          gram  parameters for the cumulative percentage plot are
          the same as those for the "conventional" histogram.

     -A   Enter the command line argument '-A' to use  the  abso-
          lute  value of the amplitude at each sample (instead of
          the signed amplitude) in the  histogram  analysis.   If
          '-A'  is present, the default /fBmin/fR is set to zero,
          and neither /fBmin/fR nor /fBmax/fR may  be  set  to  a
          value less than zero.

     -K   Enter the command line argument '-K' to use keep values
          outside  the  min/max  values, otherwise values will be
          rejected.

     -V   Enter the command line argument '-V' to get  additional
          printout.   (With  this release, you won't get anything
          additional. --DLT)

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


DISCUSSION

     This  routine  differs  from  the   histogram   created   by
     /fBscan/fR  in  several  respects.  In /fBahist/fR, the user
     has a choice of minimum and maximum  values  to  be  binned.
     Any  values  less  than the minimum are binned into a single
     'less-than-the-minimum-threshold'  bin;   likewise,   values
     greater  or  equal  to  the  maximum  are binned in a single
     'greater-then-the-maximum-threshold' bin.  The  user  has  a
     choice of binning the signed or absolute value of the sample
     amplitudes.  When displayed in xgraph, there  appear  to  be
     two  'extra'  histogram  bins  -- one just below the minimum
     value, the other just above the maximum value -- having  the
     same  breadth  as the bins bewteen the extremes.  These bins
     represent ALL values below the minimum and  above  the  max-
     imum,  respectively;  the  values  are  NOT NECESSARILY just
     below the minimum or just above the  maximum,  however!   If
     '-C'  is  chosen,  a cumulative percentage histogram will be
     created,  This histogram will have the  same  minimum,  max-
     imum,  bin  size,  and  number of bins as the 'conventional'
     histogram.  The value in each bin of  this  histogram,  how-
     ever,  will be the percent of all the samples which occur in
     that bin or in bins of lower value.  This histogram will  be
     placed  in  a  file with the same name as /fBotap/fR, except
     with the suffix ".cum" added. As displayed  in  xgraph,  the
     files produced by this program are intended to look like bar
     graphs.  Each bar represents the  number  of  samples  whose
     values  fall  between the left and right "edges" of the bar.
     A value which sits squarely on a bin boundary is  placed  in
     the  next  HIGHER  bin.   This routine can be piped directly
     into xgraph.  In this situation, the  'conventional'  histo-
     gram  will be passed to xgraph.  If '-C' is chosen, the file
     containind  the  cumulative-percentage  histogram  will   be
     called  'ahist.cum'.   This program was primarily created to
     choose a scaling factor when loading 3D data to the Landmark
     workstation, but hopefully it will find other uses as well.


BUGS

     Unknown .... but as this is a fresh release, there are prob-
     ably some.


SEE ALSO

     scan(1), skill(1), trstat(1) xgrap


AUTHOR

     [David L. Tett: SOCON 321-5681, modified by James M. Gridley
     USP Team, Tulsa, OK]














COPYRIGHT

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



































Man(1) output converted with man2html