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 tapes or disk files. 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

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. Type:

> TASK PRTTP ; INP  C R

to list the required inputs on the terminal.

> INTAPE m  C R

to specify the tape drive number (m).

> NFILES 0  C R

to print information for all the files.

> DOCRT -1  C R

to print output on your system printer.

> PRTLEV 0  C R

to select the level of reporting.

> GO  C R

to run the program.

The tape will be rewound if necessary and will then begin to move forward. All files will be read. A printout will appear on the system printer with a valuable summary of header information for each file on the data tape. The printout may be routed, instead, to your terminal by specifying DOCRT 1  C R before running PRTTP or it may be saved in a disk file by setting OUTPRINT (see §3.10.1).

As PRTTP starts executing, look for the message PRTTP BEGINS on the AIPS “monitor” (the MSG_SERVER window on your workstation or, in its absence, your own AIPS window or some nearby terminal on antique systems). If you can see the active tape drive from your terminal, look also for movement of the tape. The AIPS prompt > should have already returned on your terminal, however, since PRTTP is running as a detached “task.” As described in Chapter 3, tasks are the more complicated AIPS programs, run by the GO command after setting the task name with TASK taskname. They are shed from the terminal, as PRTTP has been here, allowing you to use AIPS for further processing (except running the same task at the same time).

The file at which the tape is currently positioned can also be “indexed” by the AIPS verb TPHEAD. This verb, which also works on FITS-disk files (§3.10.3), displays the data header to let you decide if you are pointing at the desired data file.

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 the third and fourth files on a tape mounted on tape unit number 2:

> TASK FITLD’ ; INP  C R

to set the task name and review the required inputs.

> INTAPE 2  C R

to specify the tape drive number; the tape must already be mounted as in §3.9.

> NFILES 2  C R

to skip to the third file on the tape.

> CLRONAME  C R

to use the file names on the tape.

> 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.

> NCOUNT 2  C R

to read 2 consecutive tape files.

> OPTYPE ’UV’  C R

to restrict reading to uv files.

> REWIND  C R

to rewind tape before skipping files.

> GO  C R

to run FITLD..

The tape will begin to move and appropriate messages should appear on the AIPS monitor. When the prompt > appears on your terminal, you are free to use AIPS for other purposes.

FITLD may also be used to read a FITS-disk file as:

> INFILE ’FITS:filename  C R

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

> GO  C R

to run FITLD with the adverbs set above — NFILES and NCOUNT are ignored when INFILE is not blank.

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 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.