; REWGT
;---------------------------------------------------------------
;! modifies UV data re-scaling the weights only
;# Task UV CALIBRATION
;-----------------------------------------------------------------------
;;  Copyright (C) 2010-2011
;;  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
;-----------------------------------------------------------------------
REWGT     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
REWGT     Scales uv data weights only
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 #.
OPTYPE                             'SUBA', 'IF', 'FILE'
PBSIZE                             Scaling factors to use
SUBARRAY          0.0              Apply IF scaling only to this
                                   subarray  0 -> all
BIF               0.0              Apply subarray scaling only
                                   to this IF   0 -> all
INTEXT                             Text file e.g. from RFLAG
----------------------------------------------------------------
REWGT
Task:  This task will rescale uv data weights by a user-supplied
       factor.  The factor may be different for different subarrays or
       different IFs.  See task REAMP to scale uv data amplitudes with
       corresponding changes to the weights  REWGT can also read a
       text file with weight factors in it.  That file can be written
       by RFLAG and is in the form used with BOXFILE in IMAGR.
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.
  OPTYPE.....'SUBA' scaling array applies to subarrays 1-64
             'FILE' scaling found in text file INTEXT
             other  scaling array applies to IFs 1-64
  PBSIZE.....Scaling array: multiply subarray n by PBSIZE(n) on OPTYPE
             'SUBA', else multiply IF n by PBSIZE(n).
  SUBARRAY...Limit scaling to specified subarray on OPTYPE 'FILE' and
             other.  All subarrays are copied.
             0 -> all subarrays are scaled.
  BIF........Limit scaling to IF BIF on optype 'SUBA'.  0 -> all
             and all IFs are copied anyway.
  INTEXT.....Weight array text file.  Each line has the form
             W  weight  chan   IF
             with the W in column 1.  IF blank or 0 means all IFs.
             Channels not specified get scaling factor 1.0.
----------------------------------------------------------------
