; CLCOP
;---------------------------------------------------------------
;! copy CL/SN file calibration between polarizations or IFs
;# TASK TABLE CALIBRATION
;-----------------------------------------------------------------------
;;  Copyright (C) 2005, 2012
;;  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
;-----------------------------------------------------------------------
CLCOP     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CLCOP     task to copy SN/CL table values between polarizaions
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 #
INEXT                              Input table extension type
INVERS                             Input table file version no.
OPTYPE                             'R2L' => copy Right to Left
                                   'L2R' => copy Left to Right
                                   'SWIT' => switch polarization
                                   'AVER' => average and replace
                                             IFs (no switch pol)
FPARM                              List of IFs to be included in
                                   the average (OPTYPE 'AVER')
VPARM                              List of IFs to be replaced by
                                   the average (OPTYPE 'AVER')
----------------------------------------------------------------
CLCOP
Task:  CLCOP moves the calibration in an AIPS CL or SN extention table
       from one polarization to the other .  The specified output
       table should not exist before the execution of CLCOP.

       It can convert a one polarization table into a two polarization
       table.  It calls that R2L and forces it to happen.
Adverbs:
  INNAME.....Input image name (name).       Standard defaults.
  INCLASS....Input image name (class).      Standard defaults.
  INSEQ......Input image name (seq. #).     0 => 1.
  INDISK.....Disk drive # of input image.   0 => any.
  INEXT......Extention table type (e.g. 'CL') ' ' => 'SN'
  INVERS.....Version number of table to copy, 0=>highest no.
             Output version is highest + 1.
  OPTYPE.....'R2L'  => copy right hand to left hand, right unchanged
             'L2R'  => copy left hand to right hand, left unchanged
             'SWIT' => copy left to right and right to left - thus
                       switching the polarizations
             'AVER' => average IFs listed in FPARM and replace the
                       solutions of IFs listed in VPARM wit the
                       average.
             There is no default.
  FPARM......List of IFs to be included in the average
  VPARM......List of IFs to be replaced by the average
----------------------------------------------------------------
CLCOP
Task:  Calibration copy to polarization

In some cases a source will allow calibration in only one polarization
- e.g. self-cal using a maser line.  This will allow that calibration
to be copied to the other polarization.

OPTYPE 'AVER' is used when the solutions for some IFs are rendered bad
due to RFI or the presence of real spectral-line signals.  If one
wants to replace, e.g., IF 2 with the average of IFs 1 and 3 and IF 6
with the average of IFs 5 and 7, two executions of CLCOP will be
required.
