; SYCOP
;---------------------------------------------------------------
;! copy SY table calibration between IFs
;# TASK TABLE CALIBRATION
;-----------------------------------------------------------------------
;;  Copyright (C) 2011-2013
;;  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
;-----------------------------------------------------------------------
SYCOP     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
SYCOP     task to copy SY table values between IFs
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 #
INVERS                             Input table file version no.
APARM                              List of IFs to average
BPARM                              List of IFs to receive values
OPTYPE                             ' ' do same operation in R&L
                                   'R' do only in R polarization
                                   'L' do only in L polarization
                                   'R2L' average in R save in L
                                   'L2R' average in L save in R
                                   'AR2L' R -> L no averaging
                                   'AL2R' L -> R no averaging
ANTENNAS                           List of antennas to do or
                                   not to do (1 value < 0)
----------------------------------------------------------------
SYCOP
Task:  SYCOP moves the calibration in AIPS SY and CD extension tables
       from one or more IFs to other IFs.  SY table values are easily
       made useless by RFI, so it may be wise to move values from good
       spectral windows to those so affected.  The output table will
       be a new file.

       NOTE: if you average IFs using more than one in APARM, the
       average is done in the recorded parameters Pdif, Psum, Pgain,
       and Tcal.  However, TYAPL applies them in ratios: Tcal/Pdif for
       gains and Tcal * Psum / Pdif for weights.  Averaging should
       really be done in these parameters in TYAPL rather than by
       SYCOP.  TYAPL does NOT offer this option at present.

       OPTYPE, ANTENNAS, and BPARM select the data which are altered
       by the requested operation.  All other SY data are passed from
       INVERS to the output SY table version unchanged.
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.
  INVERS.....Version number of table to copy, 0=>highest no.
             Output version is highest + 1.
  APARM......List of IFs to average (first zero stops list)
             (required except for AR2L and AL2R where it is ignored)
  BPARM......List of IFs to receive the average value
             (required except for AR2L and AL2R where it is ignored)
  OPTYPE.....Controls which polarizations are used as:
             'R  ' average R and save in R, L unchanged
             'L  ' average L and save in L, R unchanged
             'R2L' average R and save in L, R unchanged
             'L2R' average L and save in R, L unchanged
             'AR2L' IFs 1-n of R go to IFs 1-n of L, R unchanged
                    (one to one copy with no averaging)
             'AL2R' IFs 1-n of L go to IFs 1-n of R, L unchanged
                    (one to one copy with no averaging)
             OTHER average R and save in R, average L and save in L
  ANTENNAS...List of antennas for which operation is to be done,
             all 0 => all.
             If any antenna number in the list is negative, then
             the list is of those antennas for which the operation is
             NOT desired.  It will be done for all others.
----------------------------------------------------------------
