; DIGICOR
;---------------------------------------------------------------
;! specifies whether VLBA digital corrections are to be applied
;# ADVERB CALIBRATION
;-----------------------------------------------------------------------
;;  Copyright (C) 1995, 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
;-----------------------------------------------------------------------
;---------------------------------------------------------------
DIGICOR   LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
----------------------------------------------------------------
DIGICOR
Type: Adverb  (Logical,  > 0  =>  true)
Use:  Standard data selection adverb. True (1) means apply
      the digital corrections to VLBA data in FITLD.
      False (-1,0) means do not apply the corrections.
Null value:  false (-1)
Tasks:
   FITLD....Reads FITS files to load images or UV (IDI or UVFITS) data
            to disk.  DIGICOR use for IDI only: Data processed in
            digital correlators such as the VLBA correlator and DiFX
            are affected by a variety of phenomena that we
            collectively refer to as digital effects. FITLD is able to
            apply the corrections needed to scale the data to the
            values that would be returned by a purely analogue
            correlator.  DIGICOR = -1 will turn off the application of
            these correction, DIGICOR = 0 or 1 will apply them to both
            cross and total power, DIGICOR = 2 will apply the
            corrections to cross-power and only to total power if
            zero-padding was used in the correlator.  The latter case
            is designed to deal with a situation in which the
            total-power spectrum is dominated by multiple, strong
            spectral lines.  In that case, if zero-padding was not
            used, the reconstructed total-power spectrum, after an
            FFT, is inaccurate at some level. In all continuum cases
            DIGICOR = 1 should be the default.  In nearly all line
            cases DIGICOR = 1 is fine. only if the Tant in the line is
            about equal to the Tsys should DIGICOR = 2 be used.  One
            word of caution, for data correlated prior to Aug 1 1994
            the correlator was incorrectly scaling the data by a
            factor of 1.57 (i.e. PI/2) . So for that data, DIGICOR can
            be used but a BFACTOR of 0.6369 (i.e. 1/1.57) should be
            applied in APCAL or to the final images.  Unfortunately
            FITLD had no knowledge of the date of correlation so
            cannot perform this correction.  The code detects data
            from the DiFX correlator and applies a different (1.0)
            saturation correction in that case.
            ****  FITLD no longer alters DIGICOR for non-VLBA arrays,
            ****  so set it carefully.  Before 5 Feb 2013, it changed
            ****  DIGICICOR to -1 if the array name was not VLBA.
            ****  Note that DiFX correlators may write VLBA as the
            ****  array even when no VLBA antennas are involved.
----------------------------------------------------------------
