; MERGECAL
;---------------------------------------------------------------
;# PROCEDURE VLBI
;! Procedure to merge calibration records after concatenation
;-----------------------------------------------------------------------
;;  Copyright (C) 1998-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
;-----------------------------------------------------------------------
;---------------------------------------------------------------
MERGECAL  LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
MERGECAL: Procedure to remove redundant calibration data
                                   *****************************
                                   * Use RUN MERGECAL first    *
                                   * (or if AIPS doesn't       *
                                   * display all of the inputs *
                                   * here).                    *
                                   *****************************
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 #
GCVER              0.0             Input GC table version
TYVER              0.0             Input TY table version
PCVER              0.0             Input PC table version
OUTVERS            0.0             Output table version (for
                                    all three types)
TIMETOL            0.0             Tolerance for comparing
                                    times (sec)
BADDISK                            Disks to avoid for scratch
----------------------------------------------------------------
MERGECAL
Type:  Procedure
Use:   MERGECAL removes redundant calibration information from
       the gain curve (GC), system temperature (TY), and phase
       cal (PC) table loaded by FITLD. If FITLD is used to
       concatenate several files containing calibration transfer
       data these tables may contain many duplicate records that
       may cause other AIPS programs to fail. Run MERGECAL after
       loading the data to avoid this.
         Type RUN MERGECAL <return> to define this procedure if
       it is not already defined.
Adverbs:
  INNAME......Main file name (name).       Standard defaults.
  INCLASS.....Main file name (class).      Standard defaults.
  INSEQ.......Main file name (seq. #)      0 => highest.
  INDISK......Disk drive # of image.       0 => any.
  GCVER.......Version number of GC table to be fixed.
                                           0 => highest.
  TYVER.......Version number of TY table to be fixed.
                                           0 => highest.
  PCVER.......Version number of PC table to be fixed.
                                           0 => highest.
  OUTVERS.....Version number of output tables (same for all
              three table types).          0 => highest + 1.
  TIMETOL.....Tolerance for time comparisons in seconds.
              Records will not be merged if their times differ
              by more than this amount.
  BADDISK.....Disk drive numbers to avoid for scratch files.
----------------------------------------------------------------
