General Utilities

The toolbox Package


This package describes utility programs in the STSDAS
toolbox package, which is divided into six subpackages for examining, editing, reformatting, and operating on images and tables. These subpackages include:

General Utilities: tools

The
tools package is a diverse set of general utility tasks. Tasks of astronomical interest include epoch, which converts between different date formats, and tprecess, which precesses images, tables, or lists of coordinates. The fparse task parses a filename into its component parts and is useful when writing scripts that perform filename manipulation. The ddiff task compares directory tree structures and produces a list of their differences; this can be useful for locating missing files. The mkapropos task creates the data base used by the apropos task. Tasks used for renaming newly-delivered reference files for the Calibration Data Base (CDBS) include uniqfile, uniqid, uniqname, and uniqtab.

Working with Image Headers: headers

The headers package contains tasks for viewing and changing the contents of an image header. The iminfo, hcheck, and hdiff tasks are used to view an image header. iminfo prints out a nicely formatted display containing the most important information from the image header. It is mostly intended for HST images, as it searches for instrument-specific keywords. The hdiff task prints the differences between two image headers. It can be used to check for disagreements between an image's header and that of its data quality mask. hcheck is used to catch inconsistencies between header keywords within the same header. The user creates a file containing conditional print statements that express the consistency relationships and the specified header keywords are printed when the consistency relationships are violated.

The remaining tasks in the headers package change the contents of the image header. The eheader task is an interactive editor for the image header. groupmod allows adds or deletes group parameters from an image. stfheader adds history information from a file to an image header. chgkeywrd renames header keywords according to a set of replacement names contained in a file. The imagree task modifies the header keyword containing the image name to agree with the actual image name. And imkeyname performs the inverse operation, renaming the image to agree with the header keyword.

Working with Images: imgtools

The imgtools package contains tasks that manipulate the pixels of an image. Several tasks can be used to create a new image. imcalc creates an image as a mathematical function of one or more input images. gcopy copies all the groups of an input image to an output image. (Unlike imcopy in the IRAF images package, which will only copy a single group.) moveheader combines the pixels of an input image with the header of a second input image to produce a third image. iminsert overlays a first image on a second to produce an output image. improject produces an output image of reduced dimensionality from an input image by either summing or averaging over the reduced dimension. stack performs the opposite operation, by combing several images to produce one of higher dimensionality. rbinary converts a binary file with contiguous pixels into an image. xyztoim interpolates on a table with position and intensity information to create a two-dimensional image. xyztable converts the same information to a new table. mkgauss creates an image of a two- dimensional Gaussian function.

Several other tasks update an existing image. pixedit will change individual pixels in an image. boxinterp fills a rectangular area with values interpolated from the surrounding area. imfill sets pixels in an image to a fill value whenever a mask file flags the pixels as bad.

Two tasks are intended specifically for mask files. addmasks combines two or more masks into an output mask. copymask converts a mask from one format to another.

The remaining tasks report information about an image. listarea prints a section from an image. pixlocate prints the locations of pixels falling inside or outside an intensity range. And xy2rd translates the coordinates of a pixel in a two-dimensional image to right ascension and declination.

Converting Files: convfile

The convfile package contains tasks for converting the machine- dependent file formats used for storing GEIS images and binary STSDAS tables to formats used by other machines. This conversion is required if the files are being moved to a machine where the byte ordering is different, as was mentioned in Chapter 3. Note that this conversion is not required for files that are stored in machine-independent format such as FITS files and ASCII files.

Tasks in this package include:

Tasks in the convfile package are often used in conjunction with IRAF networking so that the file format is converted as the file is copied across the network to a machine with a different architecture (see "Networking Syntax" on page 34). For example, if you were running IRAF on a Sun and had tables on the remote VAX host abcvax in the directory disk$scratch:[caldir], you could copy the tables to your current directory on the Sun by using the following commands (note that the direction parameter is explicitly set to "vs"):

co> set scrdir = "abcvax!disk\$scratch:[caldir]"
co> tconvert scrdir$*.tab . vs

General Utilities: tools
Working with Image Headers: headers
Working with Images: imgtools
Converting Files: convfile

Generated with WebMaker