imagetrans - apply a coordinate transform to an image


imagetrans infile=<string> outfile=<string> transform=<string> inverse=<string> method=<string> bitpix=<integer>


This tool performs arbitrary coordinate transforms on an image, such as translations, rotations, etc. The transform is specified by a FITS file, usually created by the getxform or combinexform tools. These transforms are primarily linear "affine" transforms. However, there is some support for arbitrary non-linear transforms specified by a map.

The transformed image will have no WCS keywords. These may be written by the user with the getwcs or transform_wcs tools. The former is useful if you are transforming between two coordinates systems specified in a teldef file. The latter is useful if you want the transformed image to have the same world coordinates as the original image.

Note that except for the special case where the original and transformed pixel grids coincide, transforming an image will reduce its resolution. Therefore it is best to not apply sucessive transforms to an image. Instead use the "combinexform" tool to combine the transforms and then apply that to the original image.

For convenince there may be mission-dependant scripts which tie together the process of generating a transform, transforming an image and writing its WCS keywords. Check the documentation for your mission for more details.


infile [string]

The image to be transformed.

outfile [string]

The transformed image. If imagetrans can create a new file with the given name it will write the image to the primary HDU. Otherwise it will append a new HDU to the named file.

transform [string]

The FITS file specifying the transform to apply to the data. This file is usually generated by the getxform or combinexform tools.

inverse [string]

Some transform methods (e.g. interpolate) allow providing the inverse transform instead of the forward transform. Note that it is never necessary to set both this parameter and the "transform" parameter.

method [string]

The name of the method used to transform the pixel values. For a general transform, the original pixels do not correspond exactly to the transformed pixels. Therefore assigning values to the transformed pixels is not as simple as copying values from the original image. Imagetrans can do the following methods:

bitpix [integer]

The BITPIX value for the output image. If this is zero, then the output image will have the same bitpix as the input image. Otherwise this parameter can have any of the legal FITS values. This parameter is useful to force an output image to have floating point pixels if the input image is stored in integers. Note that transformed images stored in integers retain the same BZERO and BSCALE scaling as the original image. Floating point images tend to require more storage that integer valued pixels, but many of the transform methods will produce fractional pixel values even from an all-integer input image.

(chatter = 1) [integer]

Output verbosity

(dimenx = -1) [integer]

The horizontal size of the output image in pixels. If this is set to "-1", then the output image will have the same size as the input image.

(dimeny = -1) [integer]

The vertical size of the output image in pixels. If this is set to "-1", then the output image will have the same size as the input image.

(history = yes) [boolean]

Write HISTORY keywords to output?

(seed = -1956) [integer]

Random number generator seed for the events method. The events method will produce exactly the same results for a given seed every time it is run.

(zeronulls = no) [boolean]

If this is true, then null pixels in the input image will be treated as zeros.

(alpha = -1) [real]

Exponent for inverse distance weighting with method=interpolate and a forward transform.



getxform, combinexform, getwcs, transform_wcs


October 2009