; HYB
;---------------------------------------------------------------
;! RUN to set parameters for HYBRID (CALIB/MX) self-cal imaging
;# RUN CALIBRATION AP VLBI IMAGING
;-----------------------------------------------------------------------
;;  Copyright (C) 1995
;;  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
;-----------------------------------------------------------------------
;---------------------------------------------------------------
HYB       LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
HYB:  Proceedure for hybrid mapping.
                                   ===== INPUT MAP =============
INNAME                             Clean map name (name)
INCLASS                            Clean map name (class)
INSEQ              0.0      9999.0 Clean map name (seq. #)
INDISK             0.0         9.0 Clean map disk drive #
INVER              0.0      9999.0 CC file version #
                                   ===== CLEAN COMPONENT EDITING
NCCBOX                             Number of editing boxes.
CCBOX                              Boxes for included components
                                     Like BOX in MX but in
                                     arcseconds.
CUTOFF                             Minimum total clean flux
                                   within CCRAD of component.
                                   ===== Input UV data =========
IN3NAME                            UV file name (name)
IN3CLASS                           UV file name (class)
IN3SEQ             0.0    999999.0 UV file name (seq. #)
IN3DISK            0.0         9.0 UV file disk unit #
                                   ===== Output data ===========
                                   Names for CALIB and MX output
OUTNAME                            Name.  ' ' => INNAME
OUTSEQ             0.0    999999.0 Seq. Number.  0=> INSEQ+1
                                   ===== CALIB =================
REFANT                             Reference antenna.
SOLINT             0.0      9999.0 Solution interval (min)
SOLMODE                            ' ','P','A&P','P!A','GCON'
SOLTYPE                            ' ','L1','GCON'
UVRANGE                            uv range for full wt. (kl)
WTUV                               wt for points outside range
MINANT                             Minimum number of antennas.
PRTLEV             0.0         2.0 Print level.
MINSNR                             Min. SNR for solution (0=>5)
                                   ===== MX ====================
CELLSIZE                           (X,Y) size of grid in asec.
IMSIZE             0.0     4096.0  Image size.
RASHIFT                            RA shift (asec)
DECSHIFT                           DEC shift (asec)
NBOXES                             Number of boxes for CLEAN
CLBOX                              Four coordinates for each box
UVTAPER                            (U,V) taper (klambda)
MXUVR                              UVRANGE for MX
                                   Min & Max baseline (klambda)
UVWTFN                             Weighting function (' ','NA')
UVBOX                              Cells for uniform weighting.
ZEROSP                             Zero spacing fluxes.
NITER                              Number of CLEAN iterations.
BMAJ                               Beam major axis (arcsec).
BMIN                               Beam minor axis (arcsec).
BPA                                Beam position angle (deg).
                                   ===== PLOTTING ==============
BLC                                Lower left corner of plot
TRC                                Upper right corner of plot
CLEV                               Lowest contour level.
                                      Logarithmic contours with
                                      7 per decade will be used
                                   ===== GENERAL ===============
BADDISK            0.0        9.0  Disks to avoid.
----------------------------------------------------------------
HYB         (RCW, modified by PJD)

Procedure:  This procedure will run a hybrid mapping loop (CALIB + MX)
            after first editing the CC file.  The user can specify the
            minimum flux level that is required in the CC file to be
            used in CALIB. He/she can then also edit the CC file to
            remove components outside a specified area.  After the CC
            file has been edited, CALIB is run using the new CC file and
            then MX. The resulting image is plotted and sent to the
            Postscript printer.

            Before attempting to run HYB the user must first define the
            procedure. This is done by typing:

                  >RUN HYB

            and only needs to be done once.  The user can them examine
            the inputs to the HYB procedure by typing:

                  >INP HYB

            To run a hybrid mapping loop type:

                  >HYBRID
            minimum flux level that is required in the CC file to be
            used in CALIB. He/she can then also edit the CC file to
            remove components outside a specified area.  After the CC
            file has been edited, CALIB is run using the new CC file and
            then MX. The resulting image is plotted and sent to the
            Postscript printer.

            Before attempting to run HYB the user must first define the
            procedure. This is done by typing:

                  >RUN HYB

            and only needs to be done once.  The user can them examine
            the inputs to the HYB procedure by typing:

                  >INP HYB

            To run a hybrid mapping loop type:

                  >HYBRID

Adverbs:
                                   ===== INPUT MAP =============
INNAME......Input Clean map name (name).     Standard defaults
INCLASS.....Input Clean map name (class).    Standard defaults
INSEQ.......Input Clean map name (seq. #).   0 => highest
INDISK......Input Clean map disk drive #.    0 => any
INVER.......CC file version #.               0 => highest
                                   ===== CLEAN COMPONENT EDITING
NCCBOX......The number of editing boxes on the CCBOX array (<10)
CCBOX.......An array defining the boxes to include Clean
            components. The numbers are bottom left corner (X,Y)
            and top righ corner (X,Y) but are in arcseconds not
            pixels.
CUTOFF......Minimum merged flux. Use a large negative value of no
            edits. 0.0 cuts of at zero.
                                   ===== Input UV data =========
IN3NAME.....UV file name (name).             Standard defaults
IN3CLASS....UV file name (class).            Standard defaults
IN3SEQ......UV file name (seq. #).           0 => highest
IN3DISK.....UV file disk unit #.             0 => any
                                   ===== Output UV data =========
OUTNAME.....UV file name (name).             Standard defaults
OUTSEQ......UV file name (seq. #).           0 => highest
                                   ===== CALIB =================
REFANT......Reference antenna for phases. 0 => CALIB will choose
SOLINT......Solution interval (min).
SOLMODE.....' ','P','A&P','P!A','GCON'
              'A&P ' => amplitude and phase.
              'P   ' => phase only
              'P!A ' => phase only (no amplitude information)
              'GCON' => amplitude and phase with constraints on
                        amplitude.  This mode requires setting
                        SOLTYPE='GCON', uses GAINERR and
                        SOLCON may be used.
              '    ' => 'A&P ' for multisource (raw) data,
                     => 'P   ' for single source data.
SOLTYPE......' ','L1','GCON'
               '    ' => normal least squares,
               'L1  ' => L1 solution,
               'GCON' => least squares which may include gain
                   constraint.
UVRANGE......uv range for full wt. (klambda)
WTUV.........wt for points outside range
MINANT.......Minimum number of antennas.      0 => 6
PRTLEV.......Print level.
MINSNR.......Min. SNR for solution (0=>5)
                                   ===== MX ====================
CELLSIZE.....(X,Y) size of grid in asec.
IMSIZE.......Image size (pixels).
RASHIFT......RA shift (asec)
DECSHIFT.....DEC shift (asec)
NBOXES.......Number of boxes for CLEAN
CLBOX........Four coordinates for each box
UVTAPER......(U,V) taper (klambda)
MXUVR........UVRANGE for MX
             Min & Max baseline (klambda)
UVWTFN.......Weighting function (' ','NA')
ZEROSP.......Zero spacing fluxes.
NITER........Number of CLEAN iterations.
BMAJ.........Beam major axis (arcsec).
BMIN.........Beam minor axis (arcsec).
BPA..........Beam position angle (deg).
                                   ===== PLOTTING ==============
BLC..........Lower left corner of plot
TRC..........Upper right corner of plot
CLEV.........Lowest contour level.
             Logarithmic contours with
             7 per decade will be used
                                   ===== GENERAL ===============
BADDISK......Disks to avoid.
----------------------------------------------------------------


