; UVGLU
;---------------------------------------------------------------
;! Glues UV data frequency blocks back together
;# Task UV SPECTRAL
;-----------------------------------------------------------------------
;;  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
;-----------------------------------------------------------------------
;---------------------------------------------------------------
UVGLU     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
UVGLU     Task which glues uv frequency blocks back together
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 #
IN2NAME                            Second UV file name (name)
IN2CLASS                           Second UV file name (class)
IN2SEQ            0.0     9999.0   Second UV file name (seq. #)
IN2DISK           0.0        9.0   Second UV file disk unit #
OUTNAME                            Output UV file name (name)
OUTCLASS                           Output UV file name (class)
OUTSEQ           -1.0     9999.0   Output UV file name (seq. #)
OUTDISK           0.0        9.0   Output UV file disk unit #.
----------------------------------------------------------------
UVGLU
Task:  This task will try to glue the spectral line data from
       the second file onto the spectral line data of the first
       file, creating a file with the sum of the number of
       channels. It will only work if the databases are perfect-
       ly matched. Headers should only differ in frequency and
       the highest frequency + 1 of the first file should be the
       first frequency in the second.
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.
  IN2NAME....Second file name.
  IN2CLASS...Second file class
  IN2SEQ.....Second file sequence number.
  IN2DISK....Second file sequence number.
  OUTNAME....Output UV file name (name).     Standard defaults.
  OUTCLASS...Output UV file name (class).    Standard defaults.
  OUTSEQ.....Output UV file name (seq. #).   0 => highest unique
  OUTDISK....Disk drive # of output UV file. 0 => highest with
             space for the file.
----------------------------------------------------------------
UVGLU Glues UV data frequency blocks back together
DOCUMENTOR: H.J. van Langevelde (Sterrewacht Leiden)

                          PURPOSE

    UVGLU will check the headers of the two input files. If it
decides that these match perfectly (not considering any spectral
line information), it will than check that the second file
contains the next block in frequency. When this is OK it will
create the output file in which the number of channels will be
the sum of the number of channels in the input files and copy
the visibilities in the proper place. While doing this it checks
whether the visibilities indeed come from the same baseline.
Values for the random parameters in the output file are copied
from the first input file. The header of the first input file
is used to create the output header, keeping the right reference
frequency for the u,v,w values.

UVGLU does not require that the number of visibility points in each
file agree exactly. If the files do differ in size it is assumed that
the data in each file are sorted in time-baseline order.

    UVGLU is useful in big spectral line experiments where you
may want do deal with chunks of spectral line at the time. Use
UVCOP to split your data up and UVGLU to put them back together.












