; PRTCC
;---------------------------------------------------------------
;! prints the contents of a Clean Components extension file.
;# Task Imaging
;-----------------------------------------------------------------------
;;  Copyright (C) 1995, 1999, 2004, 2009, 2016, 2019-2020
;;  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
;-----------------------------------------------------------------------
PRTCC     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
PRTCC:  Task to print any clean component table extension files
INNAME                             Image name (name)
INCLASS                            Image name (class)
INSEQ             0.0    9999.0    Image name (seq. #)
INDISK            0.0       9.0    Disk drive #
INVERS           -5.0   46655.0    CC file ver. #
BPRINT            0.0              First row number to print
EPRINT            0.0              Last row number to print
XINC              0.0   32767.     Increment between rows
DOCRT            -3.0     132.0    If > 0, write to CRT
                                   > 72 => terminal width
OUTPRINT
                                   Printer disk file to save
DOCELL           -1.0       1.0    If > 0, print pos. in cells
----------------------------------------------------------------
PRTCC
Type:  Task
Use:   PRTCC prints on the line printer or terminal the rows of
       extension files containing clean components in the tables
       format.  PRTCC gives a running total of the flux and tells the
       number of first negative component.  For Gaussian models "type"
       GAUS means the deconvolved Gaussian and CGAU means the size of
       the source convolved with the instrumental response.

       PRTCC may also be used with complex Clean component (CX) tables.
Adverbs:
  INNAME......Image name (name).           Standard defaults.
  INCLASS.....Image name (class).          Standard defaults.
  INSEQ.......Image name (seq. #).         0 => highest.
  INDISK......Disk drive # of image.       0 => any.
  INVERS......Extension file version #     0 => highest.
  BPRINT......First component to list.     0 => 1.
              The running total is from the beginning of the file, but
              does not include flagged components.
  EPRINT......Last component to list.    < BPRINT => to end.
  XINC........Increment in component number between listings.
              <= 0 => 1.  The sum will include all components.
  DOCRT.......False (<= 0) use the line printer if OUTPRINT = ' '
                   else write named OUTPRINT file only.
                   When OUTPRINT is not blank, DOCRT=-2 suppresses the
                   page-feed character on page headers and DOCRT=-3
                   suppresses page headers and most other header
                   information.  When OUTPRINT is blank, the line
                   printer will be used.  PRTCC now counts the lines
                   to be printed before printing any and asks for
                   permission to continue if the count > 500.
              True  (> 0) use the terminal interactively.  The task will
                   use the actual terminal width as a display limit
                   unless 72 < DOCRT < width.  In that case, the display
                   limit will be DOCRT characters.
  OUTPRINT....Disk file name in which to save the line printer output.
              ' ' => use scratch and print immediately for interactive
              jobs - batch jobs use OUTPRINT = 'PRTFIL:BATCHjjj.nnn'
              (jjj= job #, nnn = user #).  When OUTPRINT is not blank,
              multiple outputs are concatenated, and the file is not
              actually printed.
  DOCELL......If true (> 0), the component positions will be
              printed in cells, if false they are printed in arc
              sec scaled by an appropriate power of 1000.
----------------------------------------------------------------
PRTCC:  Task to print the contents of a CC table
DOCUMENTOR: W. Cotton
RELATED PROGRAMS: APCLN, IMAGR, IMFIT, UVFIT

                          PURPOSE

     PRTCC is to list the contents of Clean component files in a
useable form.  Both CLEAN point components and extented model
components may be contained in the table.  PRTCC needs little
explanation except for how to obtain proper scaling of sizes and
positions for model files associated with uv data files.

     PRTCC uses the RA or Dec axis increment to determine the
appropriate scaling for parameters related to angle on the sky.  Since
the RA and Dec axes for uv data are degenerate, the axis increment is
frequently (usually, i.e. nearly always) a meaningless number such as
1 degree.  This will result in the angle like parameters being scaled
into kiloarcseconds.  To obtain more sensible results the axis
increment for the RA or Dec axis (whichever appears first in the
catalogue header) should be changed.  This is demonstrated in the
following example in which arcseconds are desired, the RA axis is the
4th axis and the desired file is on disk 2, catalogue slot 23:

>INDISK=2; GETN(23); IMHEAD
>KEYWORD='CDELT4'; KEYVALUE=1.0 / 3600., 0.
>PUTHEAD; IMHEAD

     KEYWORD='CDELT4' indicates the increment on the fourth axis.
Angle like values are stored in the header as degrees so
KEYVALUE=1.0/3600.0,0 sets the first word of KEYVALUE to 1 second in
degrees and 0 in the second word.  The axis order can be determined by
IMHEAD or QMHEAD.  After using PUTHEAD, IMHEAD or QHEAD should be
used to verify that the desired results were obtained.  These verbs
will give the RA and Dec increments in arcseconds.
