The UVDAT routines

The uvdat routines are a layer of routines which sit on top of the uvio routines. They are used to read old uv data-sets. They perform a number of functions commonly used in handling uv data. The services include:

The uvdat routines still allow the programmer to use most of the uvio routines, to get the best of both worlds. Routines available are:

      subroutine uvDatInp(key,flags)
      logical function uvDatOpn(tno)
      subroutine uvDatCls()
      subroutine uvDatRd(preamble,data,flags,n,nread)
      subroutine uvDatWRd(data,flags,n,nread)
      subroutine uvDatGti(object,ival)
      subroutine uvDatGtr(object,rval)
      subroutine uvDatGta(object,aval)
      subroutine uvDatSet(object,ival)
      logical function uvDatPrb(object,dval)

Table 2.7: Flag Values for the uvDatInp Call
Flag Meaning
'r' Get reference linetype specification (keyword 'ref').
's' Get Stokes/polarisations (keyword 'stokes').
'd' Perform input selection (keyword 'select').
'l' Get data linetype specification (keyword 'line').
'p' Apply planet rotation and scaling.
'w' Return u and v in wavelengths.
'1' Default number of channels is 1.
'c' Apply selfcal gain solutions.
'x' Data must be cross-correlation data.
'a' Data must be auto-correlation data.
'b' Input must be a single file.

The uvDatInp routine is called to setup the uvDat routines, and to retrieve the user parameters. The key argument (a character string) gives the name of the keyword to use to retrieve the input visibility data-set name. Normally it will be 'vis'. The flags argument specifies what processing steps are to be performed, and which user parameters to retrieve. The flags argument is a character string, each character representing a processing step or parameter retrieval request. The legitimate characters are given in Table 2.7.

The uvDatInp subroutine should be called when retrieving task parameters (i.e. between calls to keyini and keyfin. It does not open any files.

The logical function uvDatOpn is responsible for opening the requested uv data-set, and performing most of the initialization steps (e.g. calling uvio routines to set the selection, linetype and planet processing options requested by its caller and by the user). uvDatOpn returns .true. if a visibility file was successfully opened. Otherwise it returns .false., indicating that there are no more files to process. uvDatOpn also returns the handle of the opened uv data-set, in the variable tno. The routine uvDatCls closes the opened uv data-set. When dealing with several files, the caller will go through the sequence: uvDatOpn, read data, uvDatCls, until uvDatOpn returns .false. (indicating no more files).

After opening, the uvDatRd routine can be used to read through the data. The arguments are the same as the uvread call, except that the file handle (tno) is not required. The routine uvDatWRd is equivalent to the uvwread routine - that is it reads the ``wide'' channels, ignoring the current linetype.

The uvDatGt routines are a set of inquiry routines, for the caller to determine what is going on inside the uvdat routines. Blurb-blurb.

The uvDatSet routine is used for the caller to instruct uvdat on what to do. Blurb-blurb

The uvDatPrb routine is used in exactly the same way (with the same restrictions) as the SelProbe routine - it is used to determine information about the selection criteria in force. Its arguments are the same as the SelProbe routine, except that the sels array is not needed (this array is stored internally in the uvdat routines.

Miriad manager