; TLCAL
;---------------------------------------------------------------
;! Converts JVLA telcal files to an SN file
;# Task UV VLA Calibration
;-----------------------------------------------------------------------
;;  Copyright (C) 2018
;;  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
;-----------------------------------------------------------------------
TLCAL     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
TLCAL     Converts a JVLA telcal file into an SN table
INNAME                             Input UV file name (name)
INCLASS                            Input UV file name (class)
INSEQ             0.0     9999.0   Input UV file name (seq. #)
INDISK                             Input UV file disk unit #
DOAPPLY          -1.0        1.0   >0 Apply any SU table fluxes
                                   **** Highly recommended ****
ASDMFILE
                                   file name in (1) and (2)
                                   else Last part of file name
                                   with (2) = ' '
----------------------------------------------------------------
TLCAL
Type: Task
Use:  Reads a JVLA telcal file and converts the complex gains and
      delays into an SN table.  This can then be applied to the CL
      table with CLCAL.  Note, if you run SETJY before running TLCAL,
      then you can use the SU table fluxes to scale the amplitudes of
      the known calibrators.  Then, after TLCAL, you may run GETJY to
      determine the fluxes of the secondary calibrators before running
      CLCAL to apply the SN table to the data set CL table.
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.
  DOAPPLY....If > 0, apply any fluxes found in the SU table to the
             amplitudes found by telcal when writing the SN values.
             HIGHLY RECOMMENDED: see above.
  ASDMFILE...(1) Last part of file name without the .GN at the end
                 ASDMFILE(2) must be blank (' ').  If it is not blank
                 the task will use the alternative below.

             The telcal files are located at the path name:
               /home/mchammer/evladata/telcal/<year>/<month>/
                !! ASDMFILE(1) !! .GN.
             The task will supply the /home/mchammer and year and
             month parts and the .GN.  You need to provide the file
             indentifier part such as C_quad1234_016.58274.92804802083
             which is the same as the identifier part needed by
             BDDFLIST and BDF2AIPS.  Be sure to omit the close quote
             so that case is preserved in the adverb value.

             An alternative if you have obtained the .GN file from
             mchammer already: Use both ASDMF(1) and ASDMF(2) to
             specify the full path to the .GN file (but leave off the
             .GN which the task will append).  This could be the same
             values for ASDMF as used by BDFLIST and BDF2AIPS if you
             put the .GN file in the same directory as the top
             directory of the SDM/BDF files.
----------------------------------------------------------------
