; BDAPL
;--------------------------------------------------------------------
;! Applies a BD table to another data set
;# TASK CALIBRATION SPECTRAL
;--------------------------------------------------------------------
;;  Copyright (C) 2013
;;  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
;-----------------------------------------------------------------------
BDAPL      LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
BDAPL:    Applies BD table to another data set
INNAME                             UV data to calibrate: name
INCLASS                            UV data to calibrate: class
INSEQ           0.0      9999.0    UV data to calibrate: seq #
INDISK          0.0         9.0    UV data to calibrate: disk
IN2NAME                            UV data with BD table: name
IN2CLASS                           UV data with BD table: class
IN2SEQ          0.0      9999.0    UV data with BD table: seq. #
IN2DISK         0.0         9.0    UV data with BD table: disk
BLVER           0.0                version of BD table to use
OUTNAME                            Output UV data: name
OUTCLASS                           Output UV data: class
OUTSEQ         -1.0      9999.0    Output UV data: seq. #
OUTDISK         0.0         9.0    Output UV data: disk  #
----------------------------------------------------------------
BDAPL
Type: Task

      BLCHN determines a baseline-dependent correction as a function
      of spectral channel and IF.  It applies it to the data set input
      to BLCHN and also saves a BD table containing the results with
      that input data set.  POSSM can plot the BD table.  BDAPL now
      allows the BD table to be applied to another data set so long as
      that data set contains the same number of spectral channels and
      IFs as the one input to BLCHN.  Note that both these tasks - and
      the calibration itself - should be regarded as experimental.  It
      would be better to correct the data fully for known real effects
      (such as polarization leakage) than to do this correction
      blindly.  However, it is not too terrible since no
      time-dependence is allowed.
Adverbs:
  INNAME......Name of UV data set to which the BD table is to be
              applied.  Standard defaults.
  INCLASS.....Class of UV data set to which the BD table is to be
              applied.  Standard defaults.
  INSEQ.......Sequence number of UV data set to which the BD table is
              to be applied.  0 => highest.
  INDISK......Disk drive # of UV data set to which the BD table is
              to be applied. 0 => any.
  IN2NAME.....Name of UV data set having the BD table to be applied.
              ' ' => INNAME
  IN2CLASS....Class of UV data set having the BD table to be applied.
              ' ' => INCLASS
  IN2SEQ......Sequence number of UV data set having the BD table to be
              applied.  <= 0 => INSEQ
  IN2DISK.....Disk number of UV data set having the BD table to be
              applied.  <= 0 => INDISK
  BLVERS......Version number of BD table to be applied.  0 -> highest
  OUTNAME.....The output UV data set name.  ' ' => INNAME
  OUTCLASS....The output UV data set class. ' ' => BDAPL
  OUTSEQ......Output UV data set seq. #.  0 => highest unique.
  OUTDISK.....Output disk number. 0 => highest with space.
----------------------------------------------------------------


