; PANEL
;--------------------------------------------------------------------
;! Convert HOLOG output to panel adjustment table
;# TASK VLA ANALYSIS
;--------------------------------------------------------------------
;;  Copyright (C) 2015, 2018
;;  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
;-----------------------------------------------------------------------
PANEL     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
PANEL:  Task to convert a HOLOG image to panel adjustments
INNAME                             First image name
INCLASS                            First image class
INSEQ           0.0      9999.0    First image seq. #
INDISK          0.0         9.0    First image disk drive #
IN2NAME                            Mask image name
IN2CLASS                           Mask image class
IN2SEQ          0.0      9999.0    Mask image seq. #
IN2DISK         0.0         9.0    Mask image disk drive #
BLC                                Bottom left corner
TRC                                Top left corner
XINC                               X pixel increment
YINC                               Y pixel increment
OUTFILE                            Panel adjustment file
DOPLOT         -1.0        63.0    Bit map of desired plots
APARM                              (1) panel model
                                   (2) clip level in Mask image
                                   (3) map size in meters
                                   (4) Frequency in GHz
                                   (5) number pointings (1 dim)
                                   (8) > 0 Suppress grey-scale
                                   (9) > 0 Suppress countour
                                   (10) > 0 Suppress layout
INLIST
                                   Text file with focus, layout
                                   ' ' -> VLA, 'VLBA' known
DOTV                               > 0 -> AIPS plots to TV
TVCHAN                             TV channel to use 0 -> 1
GRCHAN                             Graphics channel to use
----------------------------------------------------------------
PANEL
Type: Task
  Converts the images created by HOLOG (which replaced HOLGR) into
  panel adjustments which may actually be applied to the antenna.

  The input image and mask image must have the same coordinates so
  that they align properly before and after application of the corners
  and increments.  The combination of BLC, TRC, XINC, and YINC must
  produce images 128 x 128 or 256 x 256 inside PANEL.
Adverbs:
  INNAME......First image name.  Usually V_DEV from HOLOG.
              Standard defaults.
  INCLASS.....First image class.    Standard defaults.
  INSEQ.......First image seq. #.   0 => highest.
  INDISK......Disk drive # for the first image.  0 => any.
  IN2NAME.....Mask image name.   Usually V_AMP from HOLOG.
              Standard defaults.
  IN2CLASS....Mask image class.    Standard defaults.
  IN2SEQ......Mask image seq. #.   0 => highest.
  IN2DISK.....Disk drive # for the first image.  0 => any.
  BLC.........Bottom left corner 0 -> 1
  TRC.........Top right corner   0 -> all
  XINC........X pixel increment
  YINC........Y pixel increment
  OUTFILE.....Text file with panel adjustments ' ' = 'HOME:panel.adj'
  DOPLOT......Which plots do you want?  0 -> 7 (all)
              Bit mask - add up all that you want
                 = 1   raw data - aips plot
                 = 2   adjustment map - aips plot
                 = 4   residual map - aips plot
  APARM.......(1) = 1 -> rigid panel, shift only
                  = 2 -> rigid panel, tilt and shift
                  = 3 -> flexible panel
              (2) Clip level in mask image - use only pixels in the
                  input image for which the mask image is > APARM(2)
              (3) mapsize in meters - used only if X axis not present
                  in header
              (4) Frequency in GHz to convert phase image - used only
                  when header units are degrees and FREQ axis is not
                  present in header
              (5) # pointings in 1 dimension - used only if the header
                  does not have the keyword VisUsed.
              (6) UNUSED
              (7) UNUSED
              (8) > 0 => Suppress gray-scale part of plots
              (9) > 0 => Suppress contour part of plots
              (10) > 0 => Suppress panel layout part of plots
  INLIST......' ' -> use focus langth and ring/panel structure of the
                     VLA
              'VLBA' -> use structure of vLBA antennas
              other -> text file containing on first non-comment line
                     the focal length in meters in free format and
                     on subsequent non comment lines the number of
                     panels in this ring and the inner and outer
                     radius of this ring (in meters).  Up to 10 rings
                     may be included.  Comment lines begin with a # or
                     a semi-colon.
  DOTV........> 0 => AIPS plots are done on the TV
  TVCHAN......Gray-scale TV channel to use for gray-scale AIPS plots
  GRCHAN......Graphics channel to use for labeling, contours, and
              panel layout parts of AIPS plots.  0 -> 1,2,3 resp.
----------------------------------------------------------------
