; PCAVG
;---------------------------------------------------------------
;! Averages pulse-cal (PC) tables over time
;# Task Calibration VLBI
;-----------------------------------------------------------------------
;;  Copyright (C) 2017-2018
;;  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
;-----------------------------------------------------------------------
PCAVG     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
PCAVG     Task which time averages pulse-cal tables
INNAME                             Input UV file name (name)
INCLASS                            Input UV file name (class)
INSEQ             0.0     9999.0   Input UV file name (seq. #)
INDISK            0.0        9.0   Input UV file disk unit #
INVERS            0.0              Input PC table version
SOLINT                             Averaging time in seconds
                                   < 0 -> use strict intervals
BADDISK                            Disks to avoid for scratch
----------------------------------------------------------------
PCAVG
Task:  This task sorts the input PC table into antenna-time order and
       then writes out a new PC table averaging over time (but not
       between scans).
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.
  INVERS.....PC table version to be averaged.  0 -> highest
  SOLINT.....Averaging time in seconds.  No default.
             If < 0, each scan is broken up into intervals of length
                ABS(SOLINT) and PC records falling in the interval are
                averaged with the time of the interval set at its mid
                point.
             If > 0, each SOLINT interval begins with a data sample
                for the current antenna and lasts until the first time
                more than SOLINT later (or the scan ends, the source
                changes, etc.).  This means that the different
                antennas will end up with different averaged times if
                there has been any editing or drop outs.  PCFLG on
                such a data set will be less than desirable.
  BADDISK....The disk numbers to avoid for scratch files (sorting
             tables mostly).
----------------------------------------------------------------
