5.1 Preparing uv data for imaging

AIPS requires visibility data to be calibrated before imaging. If your data are not yet calibrated, return now to Chapter 4, read in your data, and carry out the steps necessary to determine calibration corrections for your data. Note that the main imaging task, IMAGR, does not require you to run SPLIT to apply the calibration in advance. IMAGR can do that for you. Nonetheless, for simplicity and speed — if you are running IMAGR multiple times — it may be best to SPLIT and perhaps even UVSRT the data in advance of running IMAGR. When used for self-calibration, tasks CALIB and SCMAP normally work on data that have been SPLIT in advance.

If your calibrated data are not already on disk in AIPS cataloged files, then you will need to import them. These data will normally arrive in AIPS from FITS format disk files, although FITS format tapes may also be used. FITS is the internationally recognized standard for moving astronomical data between different types of computers and different software packages. Pre-1990 VLA data may also be stored on EXPORT format tapes. This format was written by the now-deceased VLA DEC-10 and as an option by old versions of AIPS.

5.1.1 Indexing the data — PRTTP

Copy your data file(s) to a disk visible to your computer and set an environment variable, e.g.MYAREA, to point at the disk directory containing the files; see §3.10.1 and §3.10.3. Then start AIPS, and enter

> DATAIN = ’MYAREA:filename  C R

to point at the data file named filename.

> TPHEAD  C R

to see a summary of the file header to make sure it is the file you want.

Should you still have magnetic tape, bring your data tape to the AIPS processor and follow the tape mounting instructions in §3.9. The program PRTTP reads a full tape and prints out a summary of all the uv and image data on tapes written in any of the supported formats. It is helpful to route the output to the line printer by setting DOCRT=-1 ; OUTPRINT = ’’. The file at which the tape is currently positioned can also be “indexed” by the AIPS verb TPHEAD.

5.1.2 Loading the data — FITLD and UVLOD

FITLD copies FITS-format images and uv data from tape (or from an external FITS-format disk file) into your AIPS catalog on disk. The following shows inputs to FITLD for reading data from a FITS-disk file:

> TASK FITLD’ ; INP  C R

to set the task name and review the required inputs.

> DATAIN ’FITS:filename  C R

to read the FITS-disk file in the public area known as $FITS of name filename.

> CLRONAME  C R

to use the file names in the file.

> OUTDISK 3  C R

to specify writing to disk 3, e.g., to select a disk with sufficient free space. (See §3.6 for help in monitoring free disk space).

> DOUVC 1  C R

to use compressed uv disk format to save space.

> GO  C R

to run FITLD..

Multiple FITS-disk files may be read in one run of FITLD; set NFILES and name the files with sequential post-pended numbers beginning with 1 (e.g.FITS-file_1, FITS-file_2, , FITS-file_n). See §3.10.3 for a discussion of FITS disk files.

If you have the data on tape, mount the tape and use the commands described in §3.9.4 to position the tape to the desired data file. Check the positioning with TPHEAD, set adverb NFILES=0 to leave the tape position fixed, set NFILES and OPTYPE if you wish to load more than one file, and then issue the GO to FITLD. If your data are in the old EXPORT format, you must use UVLOD instead. This task is restricted to uv files, but can read both FITS and EXPORT formats. Since the latter may have multiple sources, frequencies, and the like in each file, UVLOD has extra adverbs to let you specify source name, frequency band, source qualifier number, and, if all others fail, position within the file. See HELP UVLOD  C R for details.

Once FITLD has finished, check that your disk catalog now contains the uv data you have just tried to load by:

> INDI OUTDISK ; UCAT  C R

which will list all uv data sets in your disk catalog. This list should look something like:

CATALOG ON DISK  3  
CAT USID MAPNAME      CLASS   SEQ  PT     LAST ACCESS      STAT  
  1   76 3C138 A C   .UVDATA .   1 UV 22-MAR-1995 12:33:34

Alternatively, get terminal and hard-copy listing of your catalog by:

> CLRNAME ; INTY ’UV’  C R

to list all disks, uv files only.

> CATALOG  C R

to put the catalog listing in the message file.

> PRTMSG  C R

to print the message file.

This sequence takes a little longer to execute, but the hard-copy list (sent to the appropriate printer) may be useful if your catalog is a long one. Note that the catalog has assigned an ordinal number to the data set in the first (CAT) column of the listing. This number and the disk number (3) should be noted for future reference as they are useful when selecting this data set for further processing. See §3.3 and §3.3.1.

5.1.3 Sorting the data — UVSRT

Some of the AIPS imaging tasks, such as UVMAP, require the uv data to be in “XY” sort order (decreasing |u|). The recommended IMAGR is able to sort the data for you and will do so only if it has to. If you are planning to run IMAGR a number of times, you can help things along by sorting the data in advance. Note, however, that self-calibration requires data in TB (time-baseline) order. Thus, if you are planning to use self-calibration, you should probably sort the data to — or leave them in — TB order. To sort a data set:

> TASK UVSRT’ ; INP  C R

to set the task name and list the input parameters.

> INDI n ; GETN ctn  C R

to select the input file, where n is the disk number with the uv data and ctn is its catalog number on that disk. (n = 3 and ctn = 1 from our UCAT example).

> OUTN INNA ; OUTCL UVSRT  C R

to set the output file name to the same as the input file name and the output file class to UVSRT; these are actually the defaults.

> SORT ’XY’  C R

to select the “XY” sort type required for image making.

> INP  C R

to review the inputs you have selected. N.B., check them carefully since the sort can be time consuming for large data sets.

> GO  C R

to run the task UVSRT.

The task MSORT may be faster for data sets with large numbers of spectral channels and for data sets that are nearly in the desired order. Task OOSRT is yet another option.

Once UVSRT has finished, check that a uv database with the “class” .UVSRT has appeared in your disk catalog by:

> INDI 0 ; UCAT  C R

The catalog listing might now look like:

CATALOG ON DISK  3  
CAT USID MAPNAME      CLASS   SEQ  PT     LAST ACCESS      STAT  
  1   76 3C138 A C   .UVDATA .   1 UV 22-MAR-1995 12:33:34  
  2   76 3C138 A C   .UVSRT  .   1 UV 22-MAR-1995 12:56:50

Note that the catalog number of the sorted file need not be contiguous with that of the unsorted file. All AIPS installations now have “private” catalog files containing only your data. Your uv files will have contiguous catalog numbers starting from 1 when you first write uv data to disk. See also §3.3.3.

Deep integrations often involve multi-day observations of the same source position in the same antenna configuration. After calibration (and usually at least one round of self-cal), such data may be combined and compressed by the RUN file STUFFR. This compiles a procedure that will convert times to hour angles (TI2HA), sort, and concatenate the data from all days, and then do a baseline-length dependent time averaging (UBAVG). This produces a data set which is more manageable in size and which can still be self-calibrated at some level, although the days are now fully merged. Task HA2TI reverses the process, although the separation of merged days will be lost.

5.1.4 Combining data sets for imaging — DBCON and VBGLU

Multiple data sets may be combined — with some serious restrictions — to make a single image. DBCON only works properly if the two data sets are rather similar. Multi-source files must have been observed with the same antenna locations and names; DBCON then produces a multi-source output file with one subarray. For single-source files (after SPLIT) however, DBCON can create an output with multiple “subarrays” represented by multiple AN (antenna) tables. Thus data from multiple array configurations having the same polarization, spectral, and IF structure can be combined and imaged together. DBAPP does a similar operation for data sets that match more closely. DBCON allows you to scale the weights of the two data sets to control how they contribute to the final image. Task AVGWT will provide data on the average and rms of weights in selected portions of a data set.

IMAGR can loop over subarray, allowing the desired imaging. However, IMAGR cannot loop over frequency ID numbers. To combine data sets at different frequencies one must use VBGLU. This task was initially written to combine multiple passes of the correlator over the same data set since, now obsolete correlators were limited in the number of IFs in a single pass through the input data. Because of the foibles of those correlators, VBGLU can combine data samples from one data set that at times do not occur in the others. It simply flags the data from the IFs that were not observed at that time. This capability was extended in 31DEC21 to allow for data sets from different days. So long as the polarizations of the data sets and the number of spectral channels match, up to 4 data sets may be combined from disparate observing sessions in one run of VBGLU. This does make for a large data file but enables imaging, e.g. data from both ends of C band together, or even S and C band, if the spectral index is close to zero.