; AHIST
;---------------------------------------------------------------
;! Task to convert image intensities by adaptive histogram
;# Task Imaging Analysis
;-----------------------------------------------------------------------
;;  Copyright (C) 1995
;;  Associated Universities, Inc. Washington DC, USA.
;;
;;  This program is free software; you can redistribute it and/or
;;  modify it under the terms of the GNU General Public License as
;;  published by the Free Software Foundation; either version 2 of
;;  the License, or (at your option) any later version.
;;
;;  This program is distributed in the hope that it will be useful,
;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;  GNU General Public License for more details.
;;
;;  You should have received a copy of the GNU General Public
;;  License along with this program; if not, write to the Free
;;  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
;;  MA 02139, USA.
;;
;;  Correspondence concerning AIPS should be addressed as follows:
;;         Internet email: aipsmail@nrao.edu.
;;         Postal address: AIPS Project Office
;;                         National Radio Astronomy Observatory
;;                         520 Edgemont Road
;;                         Charlottesville, VA 22903-2475 USA
;-----------------------------------------------------------------------
;---------------------------------------------------------------
AHIST     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
AHIST     Translates image intensities by windowed histogram
INNAME                             Input image name (name)
INCLASS                            Input image name (class)
INSEQ             0.0     9999.0   Input image name (seq. #)
INDISK            0.0        9.0   Input image disk unit #
OUTNAME                            Output image name (name)
OUTCLASS                           Output image name (class)
OUTSEQ           -1.0     9999.0   Output image name (seq. #)
OUTDISK           0.0        9.0   Output image disk unit #.
BLC                                Bottom left corner of input
TRC                                Top right corner of input
XINC              0.0       29.0   Window size in X
YINC              0.0       29.0   Window size in Y
PIXRANGE                           Pixel range included in the
                                   histograms.
----------------------------------------------------------------
AHIST
Task:  This task converts the image intensities by performing a
       histogram equalization over a window XINC by YINC pixels
       centered on each output pixel.  This operation enhances
       the contrast in regions of low contrast and reduces the
       differences between very bright and very weak
       intensities.  HISEQ performs this operation over the full
       image (cube) while AHIST uses a 2-dimensional window
       about each pixel.
Adverbs:
  INNAME.....Input image name (name).       Standard defaults.
  INCLASS....Input image name (class).      Standard defaults.
  INSEQ......Input image name (seq. #).     0 => highest.
  INDISK.....Disk drive # of input image.   0 => any.
  OUTNAME....Output image name (name).      Standard defaults.
  OUTCLASS...Output image name (class).     Standard defaults.
  OUTSEQ.....Output image name (seq. #).    0 => highest unique.
  OUTDISK....Disk drive # of output image.  0 => highest disk
             number with sufficient space.
  BLC........Bottom right corner in input image of desired
             subimage.  Default is entire image.
  TRC........Top right corner in input image of desired
             subimage.  Default is entire image.
  XINC.......Window size in X pixels - should be odd and at
             least 5.  Limit is 29, 0 => 11.  XINC/2 pixels on
             the left and right edges will be blanked.
  YINC.......Window size in Y pixels - should be odd and at
             least 5.  Limit is 29, 0 => 11.  YINC/2 rows on the
             top and bottom will be blanked.
  PIXRANGE...Pixels outside this intensity range are not
             included in the hsitograms and are set to -0.001
             and 1.001 respectively.  PIXRANGE(2) <= PIXRANGE(1)
             tells the task to use the full image intensity
             range.  It is often best to specify PIXRANGE(1) to
             be just above the background noise level.
             Otherwise the algorithm greatly expands this
             background emphasizing the noise.
----------------------------------------------------------------
