; OUTFGVER
;---------------------------------------------------------------
;! selects version of the flagging table to be written
;# ADVERB EDITING
;-----------------------------------------------------------------------
;;  Copyright (C) 2007, 2020
;;  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
;-----------------------------------------------------------------------
OUTFGVER  LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
----------------------------------------------------------------
OUTFGVER
Type: Adverb  (Scalar)
Use:  Selects the version of the flag table to be written.

      In normal usage by editing tasks, FLAGVER selects the FG table
      applied to the data on input.  If OUTFGVER selects a new FG
      table, then the flag commands from FLAGVER are copied to
      OUTFGVER and then the new flags are appended.  If OUTFGVER
      selects an existing FG table (1 <= OUTFGVER <= FGmax), then the
      new flags are appended to version OUTFGVER but the flags of
      FLAGVER are not copied.  If OUTFGVER <= 0 or OUTFGVER > FGmax,
      then a new FG table will be written with version FGmax + 1.

      A flag table may be applied to single-source or multi-source
      data sets and may be applied to data which are not in time
      order.  If data are in time order, then flagging will work so
      long as no more than 6000 flags apply to any one time.  If the
      data are not in time order, then flagging works only if no more
      than 6000 flags apply to the current data.  If you exceed these
      limits, you may run UVCOP to apply the FG table so long as you
      are within limits 10 times larger.

Null value:  0 => write a new flag table, but can vary with task.

Tasks:
   ACLIP.....Edits suto-corr data for amplitudes, phases, and weights
             out of range
   BPEDT.....Interactive TV task to edit uv data based on BP tables.
   BPFLG.....Flgas uv data based on bad BP values.
   CLIP......Edits data based on amplitudes, phases, and weights out
             of range
   CORER.....Calculates correlator statistics and flags bad ones.
   DEFLG.....Edits data based on decorrelation over channels and time
   EDITA.....Interactive TV task to edit uv data based on TY/SN/CL
             tables
   EDITR.....Interactive baseline-oriented visibility editor using the
             TV
   FGSPW.....Flags bad spectral windows.
   FLAGR.....Edit data based on internal RMS, amplitudes, weights
   FLGIT.....Flags data based on the rms of the spectrum
   FTFLG.....Interactive flagging of UV data in channel-time using
             the TV
   IBLED.....Interactive BaseLine based visibility EDitor
   OFLAG.....Uses on-line flag table information to write a flag table
   REWAY.....Computes weights based in rms in spectra.  Output flag
             table is optional and is used when solutions are "bad".
   RFLAG.....Flags data set based on time and freq rms in fringe
             visibilities.
   SCIMG.....Full-featured imaging plus self-calibration loop
   SCMAP.....Imaging plus self-calibration loop
   SPFLG.....Interactive flagging of UV data in channel-T using the TV
   TVFLG.....Interactive flagging of UV data in TB using the TV
   UFLAG.....Plots and edits data using a uv-plane grid and the TV.
   UVFLG.....Flags UV-data
   UVMLN.....Edits data based on the rms of the spectrum
   WETHR.....Plots selected contents of WX tables, flags data based on
             WX (weather data)
   WIPER.....Plots and edits data from a UV data base using the TV
----------------------------------------------------------------
