; WTMOD
;---------------------------------------------------------------
;! modifies weights in a UV data set
;# Task UV
;-----------------------------------------------------------------------
;;  Copyright (C) 1995, 2001
;;  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
;-----------------------------------------------------------------------
WTMOD     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
WTMOD     Task to modify weights in a uv data set.
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 #
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 #.
APARM                              Control info:
                                   1 = multiplier (0=>1)
                                   2 = power (0=>1)
                                   3 = Max. (0=>infty)
ANTWT         -9999.0     9999.0   Replace weights (all ants.)
----------------------------------------------------------------
WTMOD
Task:  This task will modify the weights of uv data as specified by
       the user.  The purpose is to adjust the weights so that data
       from very sensitive baselines will not swamp the less sensitive
       baselines.  The maximum and minimum weights (in absolute value)
       after the modifications will be reported.  The output file may
       be the input file.  The weights of flagged data are also
       modified, but they are not unflagged by this program.  WTMOD
       can flag data, however.

       WTMOD can also be used to change system-temperature dependent
       weights into constant ones for concatenation with old data
       sets.

       WTMOD handles compressed data finally (8-Feb-2001)!  It is
       particularly fast since it does not need to unpack and then
       repack the data to change the weight.
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.
  OUTNAME....Output UV file name (name).     Standard defaults.
  OUTCLASS...Output UV file name (class).    Standard defaults.
  OUTSEQ.....Output UV file name (seq. #).   0 => highest unique
  OUTDISK....Disk drive # of output UV file. 0 => highest with
             space for the file.
  APARM......Weight modification control information (ignored in any
             ANTWT is not 0.0):
             1 = A multiplier for the weights. 0 => 1.0
             2 = A power to which to raise the weights;  0 => 1.0
                 0.25 - 0.5 is a useful range for VLBI.
                 Weight_out = (APARM(1) * Weight_in) ** APARM(2)
             3 = The maximum acceptable value of the weight.
                 Values higher that APARM(3) will be set to
                 APARM(3).  0 => infinity.
  ANTWT......Replace vis. weights with constant values. A new weight
             must be specified for all antennas.  (If there are > 30
             antennas, the average (abs) value is used for antennas >
             30.)  Negative values may be used to flag data.  Note
             that previously flagged data remain flagged, but
             otherwise at the new weights.
             Weight_out = SQRT (ANTWT(ant1) * ANTWT(ant2)) ignoring
             Weight_in except for flagging information (sign).
----------------------------------------------------------------
