6.1 Getting data into your AIPS catalog

By the time you reach this chapter, most of your data will probably already be loaded into your AIPS catalog either by reading an external tape or disk or by being generated by some AIPS task. Visibility data which are not presently on disk may be read by the AIPS tasks FILLM, UVLOD and FITLD; see §4.1 and §5.1 for details. Images that are generated by other imaging systems, (e.g., images from non-NRAO radio telescopes or non-radio images) can be transported to AIPS by writing them out of the other imaging system on tape or disk in the standard FITS format. The tasks IMLOD and FITLD can then be used to read them into AIPS. These tasks are also used to read images saved with FITTP and FITAB from previous AIPS sessions.

6.1.1 IMLOD and FITLD from tape

IMLOD and FITLD will position tapes for you using the NFILES adverb. It is safer to use AIPS verbs instead to position the tape and to check that positioning. First, mount your tape in hardware and software as described in §3.9. To move the tape forward by nf file marks to position it at the first interesting image, enter:

> INTAPE n  C R

to specify the tape drive labeled n.

> NFILES nf  C R

to specify the number of file marks to move the tape.

> AVFILE  C R

to move the tape.

If nf > 0, AVFILE will advance the tape the specified number of file marks. If nf = 0, the tape is moved backward to the beginning of the current file. Once you have moved part-way into a tape, you may use nf < 0 to move backwards to the |nf| previous file. In all cases, the tape is left at the beginning of a file. Task PRTTP is an invaluable aid to determine what is on your tape and where it is; see §3.9.4 and §5.1.1. If you happen to come across a CV-IBM format tape from some astronomical museum, the verb AVMAP may also be needed. Type HELP AVMAP  C R for details. You must use IMLOD not FITLD for such antiques.

To check that the tape is positioned where you expect, type:

> TPHEAD  C R

Your terminal will then list information about the image header at which the tape is positioned. The tape position is not altered. Once the tape has been positioned at the desired image, enter:

> OUTDI n  C R

to specify writing the image to your AIPS catalog on disk n.

> OUTNAME your-chosen-name  C R

to specify the output disk file name in AIPS; the default is the image name on tape if FITTP was used to write the image to tape.

The string your-chosen-name can be any (12-character) title that you want to use as the image name within AIPS and should be specified for images from other image-processing software systems. FITLD also allows you to specify the 6-character image “class” parameter. Use OUTCLASS abcdef  C R, if you wish to change the class from that on your input tape as the image is read or if the image comes from a “foreign” system.

> OUTS -1  C R

to keep the sequence number the same as that on tape; the default is the highest unique number for images with this name and class in your current AIPS catalog.

> NFILES 0  C R

to have no further files skipped — important if you have just used AVFILE to position the tape!

> NCOUNT m  C R

to load m images consecutively starting with the image at the current tape position; default is m = 1. If you use this option, do not specify the OUTNAME unless you want the same name for all the new images in your catalog.

> GO FITLD  C R

or IMLOD, to run the task.

If OUTNAME is left unspecified, it defaults to the “name” of the image read from the FITS header — either the name previously used in earlier image processing or the source name. If OUTCLASS is unspecified, it defaults to the Class previously used in earlier image processing or to a compound name (e.g.IMAP, IBEM, QMAP, ICLN) which attempts to describe the image. These defaults are frequently good ones when you are loading multiple consecutive images with NCOUNT > 0. You may of course change the AIPS image and class names later by using RENAME (see §3.3.3 of this CookBook).

To load m consecutive further images from the same tape using the default OUTNAME (the names from their FITS header), skipping n from the sequence:

> OUTNAME ’ ’; OUTCL ’ ’  C R

to ask for the system defaults.

> NFILES n  C R

to skip n file marks.

> NCOUNT m  C R

to specify loading m consecutive images after the skip.

> GO FITLD  C R

or IMLOD, to run the program.

To dismount the tape when FITLD is done:

> DISMOUNT  C R

6.1.2 IMLOD and FITLD from FITS-disk

FITLD and IMLOD can also read FITS-format images from external disk files into your AIPS catalog. This option is indicated by setting the adverb INFILE to a non-blank value. The control parameters are the same as described above for reading FITS tapes, except that INTAPE and NFILES are ignored and NCOUNT applies only in FITLD.. Disk image files must therefore be read in only one at a time per execution of IMLOD. FITLD can read more than one FITS-disk file if the file names are identical except for sequential post-pended numbers beginning with 1. INFILE is a string of up to 48 characters that must completely specify the disk, directory, and name of the input disk file to your computer’s operating system. See §3.10.3 for a discussion of FITS-disk files.

One “feature” of AIPS complicates this otherwise straightforward disk analog of FITS tape reading. AIPS translates all of your alphabetic inputs to upper case (this was demanded by users who otherwise became confused between upper and lower cases).1 So if your computer distinguishes upper and lower cases for disk, directory, or file names, you must do two things to prepare for this before running AIPS. First, you must restrict your external disk file names to upper-case characters and numbers. Second, you must set an upper-case “environment variable” or “logical” to point to the disk and directory where your FITS-disk images are stored before you run AIPS. You may need help from your System Manager when doing this for the first time. A common strategy on UNIX machines is to create an upper-case logical name after logging in but before starting up AIPS:

% setenv MYLOGICAL myarea  C R

if using C-shell, or

$ export MYLOGICAL=myarea  C R

if using korn, bourne, or bash shells,

where MYLOGICAL is an all-upper-case string of your choice and myarea is the full path name of the disk directory that contains your FITS-disk data. AIPS usually provides a public disk area known as FITS which you may use.

Then, once inside AIPS, tell FITLD or IMLOD:

> INFILE ’MYLOGICAL:IMAGE.DAT’  C R

to read in the FITS-disk file myarea:IMAGE.DAT.