; VLBAMCAL
;---------------------------------------------------------------
;! merges redundant calibration data
;# PROCEDURE VLBI UTILITY CALIBRATION
;-----------------------------------------------------------------------
;;  Copyright (C) 2000
;;  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
;-----------------------------------------------------------------------
;---------------------------------------------------------------
VLBAMCAL  LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
VLBAMCAL: Procedure to merge redundant calibration data
INNAME                             Input file name
INCLASS                            Input file class
INSEQ                              Input file sequence number
INDISK                             Disk number for input file
BADDISK                            List of disks not to be used
                                   for scratch files.

          VLBAMCAL is defined in the VLBAUTIL run file.
----------------------------------------------------------------
VLBAMCAL
Type: Procedure
Use:  VLBAMCAL is a procedure that removes redundant calibration records from
      data from the VLBA correlator.

      Type RUN VLBAUTIL to make the VLBAMCAL procedure available.

  INNAME.....The name of the file to be corrected. Wildcard characters
             are allowed.
  INCLASS....The class of the file to be corrected. Wildcard characters
             are allowed.
  INSEQ......The sequence number of the file to be corrected.
               0 => highest number matching INNAME, INSEQ, and INDISK.
  INDISK.....The disk drive number of the file to be corrected.
               0 => any disk.
  BADDISK....A list of disk numbers that are not to be used for scratch
             files.
----------------------------------------------------------------
VLBAMCAL:           Procedure to merge redundant calibration data.
Documentor:         Chris Flatters
Related Programs:   FITLD, VLBALOAD, VLBAUTIL, MERGECAL

WHEN TO USE VLBAMCAL

Use VLBAMCAL to get rid of redundant records in calibration tables. These
result from the duplication of certain calibration data across FITS file
boundaries in VLBA export tapes and can cause AIPS programs (notably APCAL) to
fail.

You should run VLBAMCAL after you have finished loading the data from tape but
before you either change the polarization structure of the data with FXPOL,
load any calibration data for non-VLBA telescopes, or apply the calibration
data.

VLBAMCAL is intended for all levels of VLBA users and can be used in place of
the older MERGECAL procedure.

WHAT TO DO NEXT

After you have removed the redundant calibration records, you should search
for possible subarraying conditions with VLBASUBS. If you are confident that
there are no subarrays in your data and you have dual polarization data then
you will need to fix the polarization labelling with VLBAFPOL or FXPOL.
