; FXVLB
;---------------------------------------------------------------
;! Builds a CQ table to enable VLBA correlator loss corrections
;# Task UV
;-----------------------------------------------------------------------
;;  Copyright (C) 1995
;;  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
;-----------------------------------------------------------------------
;---------------------------------------------------------------
FXVLB     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
FXVLB     Task to enable VLBA FX delay decorrelation corrections
INNAME                             Input UV file name (name)
INCLASS                            Input UV file name (class)
INSEQ             0.0     9999.0   Input UV file name (seq. #)
INDISK            0.0        9.0   Input UV file disk unit #
----------------------------------------------------------------
FXVLB
Task:  This task will create a correlator parameter frequency
       (CQ) table if one has not already been created by
       FITLD. This table is used by the calibration system
       in correcting for delay decorrelation losses for the
       VLBA correlator. If a CQ table has already been
       created by FITLD then do not use FXVLB. This
       task must be used before any changes have been
       made to the frequency structure of the uv-file (eg.
       UVCOP or AVSPC with freq. selection or averaging).
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.
----------------------------------------------------------------
FXVLB:  Enable VLBA delay decorrelation corrections
Documentor: A. J. Kemball
Related Programs: SPLIT, FRING, general calibration

The amplitudes of data from the VLBA FX correlator may need to be
corrected for small de-correlation losses caused by spectral averaging
in the correlator and segmentation losses, both of which become more
significant with increasing residual delay errors. The spectral
averaging loss is caused by frequency averaging of cross-power spectra
in the correlator in the presence of residual delays.  It is more
marked for the larger bandwidths. The segmentation loss is caused by
misalignment of the data segments used in the FFT, again due to
residual delay errors. For clock errors of several hundred nanoseconds
these errors are typically a few percent and a few tenths of a percent
respectively, but this does depend on BBC bandwidth.

These amplitude losses can be corrected in AIPS after the residual
delays have been determined from fringe-fitting. If the u-v file
contains a CQ table and the array name in the AN table is 'VLBA' then
the amplitude correction will be automatically made when the delay
correction is applied at any point in the calibration (eg. SPLIT). In
more recent VLBA datasets FITLD may have written the CQ table, under
control of the adverb DELCORR. This can be determined using verb
IMHEADER.  If not then FXVLB can be used to generate a CQ table. FXVLB
will not overwrite an existing CQ table.

This procedure should be run immediately after loading the data, and
before any averaging or selecting in frequency. The corrections are
decribed in AIPS Memo. 90 which can be accessed via
http://info.aoc.nrao.edu under AIPS -> Documentation -> The AIPS Memo
Series.





