; UVPOL
;---------------------------------------------------------------
;! modifies UV data to make complex image and beam
;# Task UV VLBI IMAGING
;-----------------------------------------------------------------------
;;  Copyright (C) 1995, 1999
;;  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
;-----------------------------------------------------------------------
UVPOL     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
UVPOL     Modifies UV data to make complex image and beam
INNAME                             Input UV file name (name)
INCLASS                            Input UV file name (class)
INSEQ             0.0     9999.0   Input UV file name (seq. #)
INDISK            0.0        9.0   Input UV file disk unit #
OUTNAME                            Output UV file name (name)
OUTCLASS                           Output UV file name (class)
OUTSEQ           -1.0     9999.0   Output UV file name (seq. #)
OUTDISK           0.0        9.0   Output UV file disk unit #.
OPCODE                             'WEIG', 'DATA'
----------------------------------------------------------------
UVPOL

Task: This task converts a uv data set so that a complex polarization
   image and beam can be produced using data in which any of the Stokes'
   cross polarizations are measured.  With OPCODE = 'WEIG' (or any
   unrecognized) all weights are set to the average of the valid weights
   and invalid data is zeroed, whenever at least 1 of the
   cross-polarizations is valid.  OPCODE='DATA'causes any previously
   valid data to be set to (1,0) as well as modifying the weights.  Q
   and U images made from data processed with OPCODE='WEIG' will form
   the complex Stokes dirty image and Q and U images made from data
   processed with the 'DATA' option will be the complex beam.  This task
   is best used in conjunction with procedure CXPOLN (use RUN CXPOLN to
   load) which will make and properly normalize the complex polarization
   images.

   NOTE: this task also sets weights and values into the parallel hand
   observations.  It is not recommended to use the output for imaging
   RR, LL, Ipol, or Vpol.

Adverbs:
  INNAME.....Input UV file name (name).      Standard defaults.
  INCLASS....Input UV file name (class).     Standard defaults.
  INSEQ......Input UV file name (seq. #).    0 => highest.
  INDISK.....Disk drive # of input UV file.  0 => any.
  OUTNAME....Output UV file name (name).     Standard defaults.
  OUTCLASS...Output UV file name (class).    Standard defaults.
  OUTSEQ.....Output UV file name (seq. #).   0 => highest unique
  OUTDISK....Disk drive # of output UV file. 0 => highest with
             space for the file.
  OPCODE.....'WEIG' modifies the weights
             'DATA' modifies the data =>(1,0) and weights
             any other = 'WEIG'
----------------------------------------------------------------
