; HUINT
;---------------------------------------------------------------
;! make RGB image from images of intensity & hue, like TVHUEINT
;# Task TV
;-----------------------------------------------------------------------
;;  Copyright (C) 2014
;;  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
;-----------------------------------------------------------------------
HUINT     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
HUINT:  Make TV image from images of intensity/hue like TVHUEINT
INNAME                             Intensity image name
INCLASS                            Intensity image class
INSEQ           0.0      9999.0    Intensity image seq. #
INDISK                             Intensity disk drive #
IN2NAME                            Hue image name
IN2CLASS                           Hue image class
IN2SEQ          0.0      9999.0    Hue image seq. #
IN2DISK                            Hue image disk drive #
DOOUTPUT       -1.0         3.0    > 0 => write RGB output cube
                                   2, 3 -> also write RGB wedge
OUTNAME                            Output RGB cube name
OUTCLASS                           Output RGB cube class
OUTSEQ          0.0      9999.0    Output RGB cube sequence #
                                     0 => highest unique
OUTDISK                            Output RGB cube disk drive #
                                     0 => highest with space
OUT2NAME                           Output RGB wedge name
OUT2CLAS                           Output RGB wedge class
OUT2SEQ         0.0      9999.0    Output RGB wedge sequence #
                                     0 => highest unique
OUT2DISK                           Output RGB wedge disk drive #
                                     0 => highest with space
IMSIZE                             Pixel size of output wedge
TBLC            0.0      4096.0    Bottom left corner of image
                                     0=>entire image
TTRC            0.0      4096.0    Top right corner of image
                                     0=>entire image. See HELP!
TXINC           0.0      1000.0    Increment in pixels on X axis
TYINC           0.0      1000.0    Increment in pixels on y axis
DOALIGN        -2.0         1.0    > 0 => images must line up
                                      (see HELP DOALIGN)
TVCHAN          0.0        15.0    TV channel to use
DOWEDGE        -1.0         3.0    > 0 => plot a wedge on top.
                                   > 1.5 => wedge on right edge
                                   > 2.5 => both wedges
DOCIRCLE       -1.0         1.0    > 0 => plot hues through a
                                   full circle, else only blue
                                   through red.
PIXRANGE                           Min,Max of image intensity
                                     0 => entire range.
DPARM                              (1,2) pixrange for hue image
----------------------------------------------------------------
HUINT
Type: Task
Use:  HUINT will construct a TV image based on two AIPS images, one
      representing intensity and one representing hue.  The task
      attempts to replicate the function of the verb TVHUEINT but with
      the possibility to save the result as a rather peculiar image.
      The program enters an interactive mode in which the user selects
      options from a menu shown on a graphics overlay plane.  Options
      are to enhance each of the images individually, to select
      linear, square-root, or one of 2 logarithmic transfer functions
      for intensity or hue, and to exit with or without final updates
      and an output file. On-line help for the options is available by
      positioning the cursor to the option and pushing button D.
      Pushing buttons A, B, or C selects the option.

      Unlike TVHUI, this task works only on TVs capable of supporting
      the TVHUEINT verb.  The XAS TV does this as did some hardware
      TVs of old.
Adverbs:
  INNAME......Image name for intensity.    Standard defaults.
  INCLASS.....Image class for intensity.   Standard defaults.
  INSEQ.......Image seq. # for intensity.  0 => highest.
  INDISK......Disk unit # for intensity.   0 => any.
  IN2NAME.....Image name for hue.          Standard defaults.
  IN2CLASS....Image class for hue.         Standard defaults.
  IN2SEQ......Image seq. # for hue.        0 => highest.
  IN2DISK.....Disk unit # for hue.         0 => any.
  DOOUTPUT....> 0 => write an output image with the 3rd axis being
              RGB.  The full range of input intensities is NOT carried
              along (i.e. PIXRANGE is applied and the actual numbers
              will be in the range 0 - 1.).  The display intensity
              transfer function is used as well as the scaling,
              clipping and transfer function of the hue image done
              from DPARM(1 -> 2) plus any interactive enhancement.
              >= 2 => also write an image of the hue-intensity step
              wedge.  2 causes the hue to be on the (usually short)
              vertical axis with intensity on the (usually longer)
              horizontal axis, 3 reverses this.
              <= 0 -> skip output file.
  OUTNAME.....Output name for RGB cube.     Standard defaults.
  OUTCLASS....Output class for RGB cube.    Standard defaults.
  OUTSEQ......Output seq. # for RGB cube.   0 => highest unique
  OUTDISK.....Disk drive # of RGB cube.     0 => highest with
              space.
  OUT2NAME....Output name for RGB wedge.     Standard defaults.
  OUT2CLAS....Output class for RGB wedge.    Standard defaults.
  OUT2SEQ.....Output seq. # for RGB wedge.   0 => highest unique
  OUT2DISK....Disk drive # of RGB wedge.     0 => highest with
              space.
  IMSIZE......Controls the X and Y sizes in pixels of the output wedge
              image which is written when DOOUTPUT = 2 or 3.
              IMSIZE(1) < 25 -> TTRC(1)-TBLC(1)+1 or the maximum TV
                                X size if that is less.
              IMSIZE(2) < 20 -> 0.2 * Max (IMSIZE(1), 100)
  TBLC........Bottom Left Corner of intensity image used in the
              display.  (0,0) means (1,1).  The hue image window is
              the same size as the intensity image window, but a
              smaller window will be selected if needed to overlap the
              images.  See DOALIGN. The image size is also limited by
              the size of the TV.  TBLC is ignored on writing the
              output image except for any alignment adjustments.
  TTRC........Top Right Corner of grey-scale image: (0,0) means top
              right corner of map.  NOTE: for the intensity image
              TTRC(3-7) is set to TBLC(3-7) since only one plane is
              shown.  If the hue image is a cube, TTRC(3) is taken to
              select the plane of that cube to be used for hue.  This
              allows a hue image of one plane to color am intensity
              image of another plane of the same cube.  TTRC is
              ignored on writing the output image except for any
              alignment adjustments.
  TXINC.......Increment in pixels between displayed pixels along
              the X axis.  0 => 1.  Ignored while doing output.
  TYINC.......Increment in pixels between displayed pixels along
              the X axis.  0 => 1.  Ignored while doing output.
  DOALIGN.....Controls how the intensity, hue, and saturation images
              are to be aligned (see HELP DOALIGN).  True (>.1) means
              that the images must agree in their coordinates, though
              not necessarily in the reference pixel position.
              Alignment is by coordinate values (if DOALIGN > -0.1) or
              by offsets from the reference pixel positions (if
              DOALIGN <= -0.1).  If DOALIGN < -1.5, alignment is at
              pixels (1,1,...) ignoring the headers.
  TVCHAN......TV channel to use: 0 => 1.  Two channels are used, one
              for the intensity image and one for the hue image.
              Unlike TVHUEINT, the option to switch roles of the
              images is NOT offerred.
  DOWEDGE.....If false (<= 0.0), do not plot a step wedge.  Otherwise
              plot a wedge on the TV, but not in the output image.  (A
              wedge image is written if DOOUTPUT = 2 or 3.)
              If 1.5 >= DOWEDGE > 0.0, then plot a wedge along the top
              of the image.  If > 1.5, plot a wedge along the
              right-hand edge of the image.  If > 2.5, plot wedges
              along both the top and the right-hand side.  Each wedge
              is a wedge in intensity along the longer side of the
              wedge and in hue along the shorter side of the wedge.
              Multiple wedges are drawn for each saturation level.
  DOCIRCLE....False (<= 0) means that colors range from red to green
              to blue only.  This is appropriate for 0th and 1st
              moment images for example.  True means that colors range
              from red to green to blue and back to red (through
              purple).  This is appropriate to polarization intensity
              and angle images, for example.
  PIXRANGE....Min,Max of Image intensity.  0 => entire range
  DPARM.......(1,2) pixrange for HUE image.  0,0 => full range
----------------------------------------------------------------

