; CXPOLN
;---------------------------------------------------------------
;# PROCEDURE VLBI
;! Procedure to make complex poln. images and beam.
;-----------------------------------------------------------------------
;;  Copyright (C) 1995, 2005
;;  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
;-----------------------------------------------------------------------
CXPOLN    LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CXPOLN:  Procedure to make complex poln. images and beam.
                                   Use RUN CXPOLN first
INNAME                             UV file name (name)
INCLASS                            UV file name (class)
INSEQ              0.0      9999.0 UV file name (seq. #)
INDISK             0.0         9.0 UV file disk drive #
OUTNAME                            Output Image name
OUTSEQ             1.0      9999.0 Output sequence number
OUTDISK            1.0         9.0 Output disk
BIF               0.0      100.0   Lowest IF number 0=>all
EIF               0.0      100.0   Highest IF number 0=>all
BCHAN             0.0     2048.0   Lowest channel number 0=>all
ECHAN             0.0     2048.0   Highest channel number
IMSIZE         32.       4096.     Image size (X,Y) in pixels
CELLSIZE      1.E-12               (X,Y) size of grid in asec
RASHIFT                            RA shift (asec)
DECSHIFT                           DEC shift (asec)
UVTAPER         0.                 (U,V) gaussian taper
                                     units are kilolambda
UVRANGE         0.                 Min & max baseline (klambda)
UVWTFN                             UV dist. weight function
                                     blank => uniform
UVBOX           0.        128.     Additional rows and columns
                                   used in weighting. Use 0.
XTYPE           0.         10.     Conv. function type in x
                                     default spheroidal
YTYPE           0.         10.     Conv. function type in y
                                     default spheroidal
XPARM                              Conv. function parms for x
YPARM                              Conv. function parms for y
BADDISK                            Disk drive #'s to avoid
----------------------------------------------------------------
CXPOLN
Procedure:  This procedure will produce complex polarization images
       using a combination of tasks UVPOL and MX.  The images are then
       normalized such that the amplitude of the reference pixel of
       the complex beam is 1.0.  These images are suitable for
       deconvolution using CXCLN.
          Before attempting to use CXPOLN the RUN file CXPOLN must be
       run to define the procedure.  This is done by:
       >RUN CXPOLN
       and only needs be done once.
          CXPOLN creates several temporary files which it will destroy
       if able.  The names of these files are fixed and must be
       destroyed if a previous attempt at CXPOLN failed.  Also the
       output files must not exist before running CXPOLN.

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 image name (name).  Specify please.
             Default is 'CXPOL output
             This procedure will produce 4 images with classes
             'QIM001', 'UIM001', 'QBM001', and 'UBM001'
  OUTDISK....The disk drive # of output images.  Default 1.
  OUTSEQ.....Output sequence number.  Default 99.  It is best to
             specify these things.
  BIF........First IF to image. 0=>all.
  EIF........Highest IF to image. 0=>all higher than BIF
  BCHAN......First channel to image. 0=>all.
  ECHAN......Highest channel to image. 0=>all higher than BIF
  IMSIZE.....(X,Y) image size in pixels.
             Must be a power of 2 on each side from 32X32
             to 4096X2048
  CELLSIZE...(X,Y) pixel separation in asec.
  RASHIFT....RA shift of the phase center of field from the tangent
             point of the uv data in asec.  Map center = tangent point
             + shift.  If X>0 shifts map center to east.  NOTE:
             RASHIFT and DECSHIFT are not strictly a shift in RA and
             dec. The effect of RASHIFT on the RA of the map center is
             roughtly RASHIFT/COS(dec).  If the uv data has been
             rotated then RASHIFT and DECSHIFT refer to X and Y in the
             new coordinate system.  NOTE: only does 1 field.
  DECSHIFT...Declination shift of map center from tangent point of
             field in asec.  Map center = tangent point + shift.  If
             Y>0 shifts map center to north.
  UVTAPER....(U,V) gaussian taper (kilolambda) at 30% level
  UVRANGE....(Minimum,Maximum) baseline (kilolambda) in map.
  UVWTFN.....Weighting function of (u-v) place.
             blank=>Uniform; 'NA'=>Natural
  UVBOX......(U,V) box size for smoothing.  See HELP UVBOX
  XTYPE......Convolution function type in X-direction
             1=Pillbox, 2=exponential, 3=Sinc, 4=Exp*Sinc,
             5=Spheroidal, 6=exp*BESSJ1(x)/x.
              <= 0 or > 5  -> 5.
  YTYPE.....Convolution function type in Y-direction
  XPARM.....Array containing parameters for XTYPE.
            See HELP UVnTYPE when n=convolution type.
  YPARM.....Array containing parameters for YTYPE.
  BADDISK...Disk drive #'s to avoid for scratch files
----------------------------------------------------------------
