; UVDIF
;---------------------------------------------------------------
;! prints differences between two UV data sets
;# Task UV
;-----------------------------------------------------------------------
;;  Copyright (C) 1995, 1999, 2002-2004, 2007-2009, 2016
;;  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
;-----------------------------------------------------------------------
UVDIF     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
UVDIF:  Task to print differences between 2 UV disk files
INNAME                             UV data (name).
INCLASS                            UV data (class).
INSEQ             0.0    9999.0    UV data (seq. #).  0 => high
INDISK            0.0       9.0    Disk unit #.  0 => any
IN2NAME                            2nd UV data (name).
IN2CLASS                           2nd UV data (class).
IN2SEQ            0.0    9999.0    2nd UV data (seq. #).0=>high
IN2DISK           0.0       9.0    2nd Disk unit #.  0 => any
CHANNEL           0.0    9999.0    Frequency channel number.
BIF               0.0   32767.0    IF number to test.
NITER             0.0   32767.0    Max # lines printed.
                                       0 => 10 pages
UVRANGE           0.0              UV range in kilolambda
OPCODE                             'CLIP' print excess fluxes
                                   'UVBX' print excess uv diffs
                                   '    ' both
APARM                              (1) peak ok IPOL diff
                                   (2) peak ok pol. diff
                                   (3) peak ok u,v,w diff
                                   (4) peak ok weight diff
                                       < 0 => ignore weights
                                   (5) = 1 ignore some header
                                       = 2 ignore all header
                                           differences
                                   (6) >= 1 => include diff when
                                       both flagged
DOCRT            -3.0     132.0    > 0 -> use CRT, else printer
                                   > 72 => CRT width in chars
OUTPRINT
                                   Printer disk file to save
----------------------------------------------------------------
UVDIF
Type:  Task
Use:   Compares two uv data sets and prints those samples which differ
       by more than specified amounts in u, v, w, and/or flux.  On all
       OPCODEs, the data are checked for having reasonable (and the
       same) times, antenna numbers, and weights.  Any which don't are
       printed.  Flux comparisons are done on a correlator basis.
       NOTE: this does require the two data sets to be substantially
       identical although there can be differences in which random
       parameters are present.  It is useful for displaying mild
       differences such as those caused by flagging or self-cal.  It
       will work with one data set compressed and the other not,
       however.  Compression may cause substantial differences in
       weights.
Adverbs:
  INNAME.....1st UV file name (name).       Standard defaults.
  INCLASS....1st UV file name (class).      Standard defaults.
  INSEQ......1st UV file name (seq. #).     0 => highest.
  INDISK.....1st Disk unit #.               0 => any.
  IN2NAME....2nd UV file name (name).       Standard defaults.
  IN2CLASS...2nd UV file name (class).      Standard defaults.
  IN2SEQ.....2nd UV file name (seq. #).     0 => highest.
  IN2DISK....2nd Disk unit #.               0 => any.
  CHANNEL....Frequency channel (use 0 for continuum)
  BIF........IF number to test. 0 => 1.
  NITER......Do not list more than NITER points.  0 => no more than 10
             pages.  NOTE: on DOCRT <= 0., the task continues through
             the full data set counting "bad" points, but prints only
             the first NITER points.
  UVRANGE....Limit print to baselines >= UVRANGE(1) and <=
             UVRANGE(2) in kilo wavelengths.  0 => all.
  OPCODE.....If 'CLIP' program applies excess flux difference
                       test only.
             If 'UVBX' program applies excess u,v,w difference
                       test only.
             If anything else, does everything.
             The CLIP OPCODE uses a format which omits u,v,w and uses
             more places for flux and phase.  The UVBX OPCODE uses
             more characters for u,v,w and prints less flux
             information.  All others are a compromise between the
             two.
  APARM......APARM(1) is max. normal flux difference (Jy) for total
                      intensity
             APARM(2) is max. normal flux difference (Jy) for
                      polarization.
             APARM(3) is max. normal difference in u, v, w
                      (wavelengths).
             abs(APARM(4)) is maximum normal difference in weights,
                      < 0 -> ignore differences in flagging
                        Note that ignoring flagging cannot work with
                        compressed data since the data themselves are
                        lost, so see APARM(6) below
             APARM(5) = 1 => ignore header differences in increment,
                             reference value, reference pixel
                      = 2 => also ignore axis type, number of vis
             APARM(6) > 0.99 => include samples even if they are
                        flagged in both data sets.  Samples flagged in
                        one of the two data sets but not the other are
                        always included.
  DOCRT......False (<= 0) use the line printer if OUTPRINT = ' '
                   else write named OUTPRINT file only.
                   When OUTPRINT is not blank, DOCRT=-2 suppresses the
                   page-feed character on page headers and DOCRT=-3
                   suppresses page headers and most other header
                   information.  When OUTPRINT is blank, the line
                   printer will be used.  PRTSY now counts the lines
                   to be printed before printing any and asks for
                   permission to continue if the count > 500.  This
                   counting is expensive so consider specifying a file
                   for OUTPRINT.
             True  (> 0) use the terminal interactively.  The task will
                   use the actual terminal width as a display limit
                   unless 72 < DOCRT < width.  In that case, the display
                   limit will be DOCRT characters.
  OUTPRINT...Disk file name in which to save the line printer output.
             ' ' => use scratch and print immediately for interactive
             jobs - batch jobs use OUTPRINT = 'PRTFIL:BATCHjjj.nnn'
             (jjj= job #, nnn = user #).  When OUTPRINT is not blank,
             multiple outputs are concatenated, and the file is not
             actually printed.
----------------------------------------------------------------
