; BPFLG
;---------------------------------------------------------------
;! Flgas uv data based on bad BP values
;# TASK UV CALIBRATION EDITING
;-----------------------------------------------------------------------
;;  Copyright (C) 2019-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
;-----------------------------------------------------------------------
BPFLG     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
BPFLG: edits UV data when the bandpass values are out of range
INNAME                             Input UV data (name)
INCLASS                            Input UV data (class)
INSEQ                              Input UV data (seq. #)
INDISK                             Input UV data disk drive #
INVERS                             Input table file version no.
FLAGVER                            Flag table version
OUTFGVER          0.0              Output FG table version
TIMERANG                           Time range to include
BIF                                First IF to include
EIF                                Last IF to include
BCHAN                              First channel to inclue
ECHAN                              last channel to include
ANTENNAS                           Antennas to include
APARM                              (1) Lowest okay amplitude
                                   (2) Highest okay amplitude
                                   (3) Lowest okay phase
                                   (4) highest okay phase
BADDISK                            Disks to avoid for scratch
----------------------------------------------------------------
BPFLG
Type:  Task
Use:   To edit uv data by examining bandpass-like table data in a
       batch-like fashion.  BP table values outside the specified
       amplitude and phase ranges generate data flags output to
       the OUTFGVER flag table
Adverbs:
  INNAME.....Input UV data file (name).       Standard defaults.
  INCLASS....Input UV data file (class).      Standard defaults.
  INSEQ......Input UV data file (seq. #).     0 => highest.
  INDISK.....Input UV data file disk drive #. 0 => any.
  INVERS.....Input table file version number, 0 -> current highest.
             The input file is not changed, but may be sorted.
  FLAGVER....specifies the version of the flagging table to be applied
             to the data on input.     0 -> highest, -1 -> none.
             If the specified input flag table already exists, it is
             copied to the output flag table if OUTFGVER=0.
  OUTFGVER...Flag table version to be used on output for both single-
             and multi-source data sets.  If OUTFGVER is <= 0 or
             greater than FGmax (the previously highest FG version
             number), then a new FG table will be created for the new
             flags with version FGmax+1.  This new table will also
             contain the flags from FG version FLAGVER.  If OUTFGVER
             specifies a pre-existing FG version, then the input
             flags are not copied even if OUTFGVER and FLAGVER are
             not equal.
  TIMERANG...Time range of the data to be edited. In order:
             Start day, hour, min. sec, end day, hour, min. sec. Days
             are relative to the reference date.
  BIF........The lowest numbered IF to include.   0 => 1.
  EIF........The highest numbered IF to include. 0 =>highest.
             Note: not all data sets will have IFs.
  BCHAN......The lowest spectral channel to include.  0 -> 1
  ECHAN......The highest spectral channel to include.  0 -> max
  ANTENNAS...A list of antenna numbers to include.  0 => all.
  BADDISK....The disk numbers to avoid for scratch files (sorting
             tables mostly).
------------------------------------------------------------------------
