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 FITS-disk

FITLD and IMLOD can read FITS-format images from external disk files or magnetic tape into your AIPS catalog. The disk-file option is indicated by setting the adverb DATAIN to a non-blank value. Disk image files must be read in only one at a time per execution of IMLOD, but FITLD can read more than one FITS-disk file if the file names are identical except for sequential post-pended numbers beginning with 1. DATAIN 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 probably should do two things to prepare for this before running AIPS. First, restrict your external disk file names to upper-case characters and numbers. Second, 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:

> DATAIN ’MYLOGICAL:IMAGE.DAT’  C R

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

To check that the file name is correct, type:

> TPHEAD  C R

Your terminal will then list information about the image header of the disk file.

> 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 in your input file 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 in the file; the default is the highest unique number for images with this name and class in your current AIPS catalog.

> NCOUNT m  C R

in FITLD only, to load m images consecutively starting with the file specified by DATAIN with a 1 post pended. The other files must be the same name but with sequential numbers post pended. 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).

IMLOD and FITLD can also read images from magnetic tape; see the instructions in §3.9. Use the verbs MOUNT to mount the tape, AVFILE to advance the tape to the desired file, and TPHEAD to check that the tape is correctly positioned. Set NFILES=0, NCOUNT to the number of consecutive tape files you wish to load, and the say GO to either FITLD or IMLOD.

6.1.2 Image coordinates

Images of the celestial sphere must be rendered with some sort of coordinate “projection.” AIPS pioneered the handling of such coordinates, supporting true projective coordinates called SIN (orthographic), TAN (gnomic), ARC (zenithal equidistant), and STG (stereographic) as well as a special version of orthographic suited for East-West interferometers (NCP). AIPS also supports modern2 interpretations of GLS (SFL Sanson-Flamsteed), MER (Mercator), AIT (Hammer-Aitoff), CAR (Plate carrée). MOL (Molweide), and PAR (parabolic) “projections.” These are normally used to represent large sections of the celestial sphere. Users should be warned that reference pixel values other than zero lead to oblique projections.

Fits to the coordinates on optical images often lead to a modest amount of skew in the image. This is represented in the PCi_j or CDi_j FITS header cards. If these cards contain any significant skew, IMLOD and FITLD will tell you about it. In such cases, run DSKEW on the images after they have been loaded into AIPS. This is the only task that understands coordinate skew and it will re-grid the images for use by all other AIPS tasks.