; DOFIT
;---------------------------------------------------------------
;! Controls which antennas are fit by what methods
;# ADVERB calibration
;-----------------------------------------------------------------------
;;  Copyright (C) 2004, 2020
;;  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
;-----------------------------------------------------------------------
DOFIT     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
----------------------------------------------------------------
DOFIT
Type: Adverb (Array(30))
Use:  List of antennas to be fitted by a process or of control codes
      for fitting by antenna number.
      The use of DOFIT in CALIB, FRING, and KRING requires
      considerable understanding of the process involved.  In the case
      in which there are a number of antennas which are "good" and a
      number of antennas which are "poor/bad", one may avoid having
      the bad antennas affect the gain solutions for the good antennas
      and then use all the data to get some estimate of the gains of
      the bad antennas.  This is a multi-step process:
        1. Run CALIB/FRING/KRING selecting only the good antennas with
           ANTENNAS (DOFIT=0 is simplest).
        2. Run CLCAL to apply the resulting SN table to the existing
           CL to make a new CL - use 'CALP' to insure that the bad
           antennas still appear in the new CL table.
        3. Then, set ANTENNAS=0 (all) and DOFIT=list of bad antennas.
           Also set REFANT to the reference antenna used in step 1.
        4. Repeat the CLCAL to make a full CL table with all
           antennas.
      When DOFIT is specified, the gains (and delays and rates) of
      those antennas which are not being fit are held to (1,0,0,0).
      If the actual gains of these antennas are not this fully
      calibrated result, then the results on the fitted antennas will
      be vary wrong.  Note that when DOFIT is used, SOLTYPE is ignored
      by CALIB.
Tasks:
  APCAL.....Apply TY and GC tables to generate an SN table
            DOFIT controls type of fitting done for opacity.
  CALIB.....Determines antenna calibration: complex gain.  DOFIT lists
            antennas for which solutions are desired (see above).
  FRING.....Fringe fit data to determine antenna calibration, delay,
            rate.  DOFIT lists antennas for which solutions are
            desired (see above).
  KRING.....Fringe fit data to determine antenna calibration, delay,
            rate.  DOFIT lists antennas for which solutions are
            desired (see above).
  OMFIT.....Fits sources and, optionally, a self-cal model to uv data.
            DOFIT is abused to select components initialized as points.
Procedures:
  IMFRING...Large image delay fitting with IM2CC and OOFRING.  DOFIT
            selects antennas for which solutions are desired. (as FRING).
  IMSCAL....Large image self-cal with IM2CC and OOCAL.  DOFIT selects
            antennas for which solutions are desired (as CALIB).
  OOCAL.....Determines antenna complex gain with frequency-dependent
            models.  DOFIT selects antennas for which solutions are
            desired (as CALIB).
  OOFRING...Fringe fit data to determine antenna calibration, delay,
            rate.  DOFIT selects antennas for which solutions are
            desired (as FRING).
  VLBAAMP...Applies a-priori amplitude corrections to VLBA data.
            DOFIT controls type of fitting done for opacity.
  VLBACALA..Applies a-priori amplitude corrections to VLBA data
            DOFIT controls type of fitting done for opacity.
----------------------------------------------------------------
