; UVDI1
;-----------------------------------------------------------------
;! Subtract UV data(averaged up to one time) from the other UV data
;# TASK UV UTILITY
;-----------------------------------------------------------------------
;;  Copyright (C) 2007
;;  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
;-----------------------------------------------------------------------
UVDI1     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
UVDI1     Task to subtract one time UV data of the other UV data
INNAME                             Input UV file name (name)
                                   can be either single or multi
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 #
IN2NAME                            The second UV file (name)
                                   must be single
IN2CLASS                           The second UV file  (class)
IN2SEQ            0.0     9999.0   The second UV file  (seq. #)
IN2DISK           0.0        9.0   The second UV file  disk #
OUTNAME                            Output UV file name (name)
OUTCLASS                           Output UV file name (class)
OUTSEQ           -1.0     9999.0   Output UV file name (seq. #)
OUTDISK           0.0        9.0   Output UV file disk unit #
XINC              0.0              Write every XINC'th record.
YINC              0.0              Averaging time (sec).
ZINC              0.0              Time (secs) to which data
                                   were pre-averaged
                                   0 is OK (se help
----------------------------------------------------------------
UVDI1
Task: This task subtracts the second UV data set, averaged over all
      times, from the first UV data set.  The difference can be
      averaged before recording to the output UV file.  The time
      interval of this average is controlled by YINC.
      The both UV data must have identical set of polarizations,
      IFs, and frequency channels.
      The first input UV file can be either single- or multi-source.
      The second input must be a single source file.
Adverbs:
  INNAME.....Input UV file name (name). Standard defaults.
             can be either single or multi
  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.
  IN2NAME....The second UV file(name). Standard defaults.
             Must be single
             The second UV data do not need to be one time
             UV data because UVDI1 converts the second UV data
             to one time UV data averaging the data over the very
             large time interval (10 days)
  IN2CLASS...The second UV file (class). Standard defaults.
  IN2SEQ.....The second UV file (seq. #).   0 => highest.
  IN2DISK....Disk drive # of the second UV file. 0 => any.
  OUTNAME....Output UV file name (name).    Standard defaults.
  OUTCLASS...Output UV file name (class).   Standard defaults.
  OUTSEQ.....Output UV file name (seq. #).  Standard defaults.
  OUTDISK....Disk drive # of output UV file. 0 => highest with
             space for the file.
  XINC.......Write only every XINC'th output record.
  YINC.......Averaging time (sec).   < 0.2 => 0.2
  ZINC.......Time (sec) to which data have already been
             pre-averaged. UVAVG uses this to estimate the size
             of the output file. 0 => ignore.
---------------------------------------------------------------
UVDI1:  Task to subtract the one time UV data of the given UV data
DOCUMENTER: L. R. Kogan  NRAO/Socorro
RELATED PROGRAMS:  UVAVG

                   PURPOSE

UVDI1 subtracts one UV data (having averaged up to the one time data)
of the another UV data.
UVDI1 works similarly to the task UVAVG (OPCODE = 'SUBT'), but allows
using an arbitrary subtracting UV data.
In particular UVDI1 can use one source UV data to subtract of the other
source UV data.
