IRAF help page for package images, program geotran

from NOAO geotran -- geometrically transform a list of imagesUSAGEPARAMETERSDESCRIPTIONTIMINGSEXAMPLESBUGSSEE ALSO

geotran -- geometrically transform a list of images


USAGE

geotran input output database transform


PARAMETERS

input

List of images to be transformed.

output

List of output images. The number of output images must equal the number of input images.

database

The name of the text file containing the coordinate transformation (generally the database file produced by GEOMAP). If database is the null string then GEOTRAN will perform a linear transformation based the values of xin, yin, xout, yout, xshift, yshift, xmag, ymag, xrotation and yrotation. If all these parameters have their defaults values the transformation is a null transformation. If the geometric transformation is linear xin, yin, xout, yout, xshift, yshift, xmag, ymag, xrotation and yrotation can be used to override the values in the database file.

transform

The list of record name(s) in the file database containing the desired transformations. This record name is usually the name of the text file input to geomap listing the reference and input coordinates of the control points. The number of records must 1 or equal to the number of input images. The record names may be listed in a text file 1 record per line. The transform parameter is only requested if database is not equal to the null string.

geometry = geometric

The type of geometric transformation. The geometry parameter is only requested if database is not equal to the null string. The options are:

linear

Perform only the linear part of the geometric transformation.

geometric

Compute both the linear and distortion portions of the geometric correction.

xmin = INDEF, xmax = INDEF, ymin = INDEF, ymax = INDEF

The minimum and maximum x and y reference values of the output image. If a database file has been defined xmin, xmax, ymin and ymax ymax default to the minimum and maximum values set by GEOMAP and may be less than but may not exceed those values.

xscale = INDEF, yscale = INDEF

The output picture x and y scales in units of x and y reference units per output pixel, e.g " / pixel or Angstroms / pixel if the reference coordinates are " or Angstroms. If the reference coordinates are in pixels then xscale and yscale should be 1.0 to preserve the scale of the reference image. If xscale and yscale are undefined (INDEF), xscale and yscale default to the range of the reference coordinates over the range in pixels. Xscale and yscale overide the values of ncols and nlines.

ncols = INDEF, nlines = INDEF

The number of columns and lines in the output image. Ncols and nlines default to the size of the input image. If xscale or yscale are defined ncols or nlines are overidden.

xsample = 1.0, ysample = 1.0

The coordinate surface subsampling factor. The coordinate surfaces are evaluated at every xsample-th pixel in x and every ysample-th pixel in y. Transformed coordinates at intermediate pixel values are determined by bilinear interpolation in the coordinate surfaces. If the coordinate surface is of high order setting these numbers to some reasonably high value is strongly recommended.

interpolant = linear

The interpolant used for rebinning the image. The choices are the following.

nearest

Nearest neighbour.

linear

Bilinear interpolation in x and y.

poly3

Third order polynomial in x and y.

poly5

Fifth order polynomial in x and y.

spline3

Bicubic spline.

boundary = nearest

The choices are:

nearest

Use the value of the nearest boundary pixel.

constant

Use a user supplied constant value.

reflect

Generate a value by reflecting about the boundary of the image.

wrap

Generate a value by wrapping around to the opposite side of the image.

constant = 0.0

The value of the constant for boundary extension.

fluxconserve = yes

Preserve the total image flux. The output pixel values are multiplied by the Jacobian of the coordinate transformation.

xin = INDEF, yin = INDEF

The x and y coodinates in pixel units in the input image which will map to xout, yout in the output image. If the database file is undefined these numbers default to the center of the input image.

xout = INDEF, yout = INDEF

The x and y reference coordinates in the output image which correspond to xin, yin in the input image. If the database file is undefined, xout and yout default to the center of the output image reference coordinates.

xshift = INDEF, yshift = INDEF

The shift of the input origin in pixels. If the database file is undefined then xshift and yshift determine tha shift of xin, yin.

xmag = INDEF, ymag = INDEF

The scale factors of the coordinate transformation in units of input pixels per reference coordinate unit. If database is undefined xmag and ymag default to 1.0; otherwise xmag and ymag default to the values found by GEOMAP. If the database file is not null then xmag and ymag override the values found by GEOMAP.

xrotation = INDEF, yrotation = INDEF

The rotation angles in degrees of the coordinate transformation. Positive angles are measured counter-clockwise with respect to the x axis. If database is undefined then xrotation and yrotation default to 0.0; otherwise xrotation and yrotation default to the values found by GEOMAP. If database is not NULL then xrotation and yrotation override the values found by GEOMAP.

nxblock = 256, nyblock = 256

If the size of the output image is less than nxblock by nxblock then the entire image is transformed at once. Otherwise the output image is computed in blocks nxblock by nxblock pixels.


DESCRIPTION

GEOTRAN corrects an image for geometric distortion using the coordinate transformation determined by GEOMAP. The transformation is stored as the coefficients of a polynomial surface in record transform, in the text file database. The coordinate surface is sampled at every xsample and ysample pixel in x and y. The transformed coordinates at intermediate pixel values are determined by bilinear interpolation in the coordinate surface. If xsample and ysample = 1, the coordinate surface is evaluted at every pixel. Use of xsample and ysample are strongly recommended for large images and high order coordinate surfaces in order to reduce the execution time.

Xmin, xmax, ymin and ymax define the range of reference coordinates represented in the output picture. These numbers default to the minimum and maximum x and y reference values used by GEOMAP, and may not exceed those values. The scale and size of the output picture is determined as follows.

	ncols = ncols (inimage)
	if (xscale == INDEF)
	    xscale = (xmax - xmin ) / (ncols - 1)
	else
	    ncols = (xmax - xmin) / xscale + 1
	nlines = nlines (inimage)
	if (yscale == INDEF)
	    yscale = (ymax - ymin ) / (nlines - 1)
	else
	    nlines = (ymax - ymin) / yscale + 1

The output image gray levels are determined by interpolating in the input image at the positions of the transformed output pixels. If the fluxconserve switch is set the output pixel values are multiplied by the Jacobian of the transformation. GEOTRAN uses the routines in the 2-D interpolation package.

The linear portion of the transformation may be altered after the fact by setting some or all of the parameters xin, yin, xout, yout, xshift, yshift, xmag, ymag, xrotation, yrotation. Xin, yin, xshift, yshift, xout and yout can be used to redefine the shift. Xmag, ymag and scangle reset the scale of the transformation. Xrotation and yrotation define the orientation of the tranformation.

If the CL environment variable nomwcs is "no" then the world coordinate system of the input image will be modified in the output image to reflect the effects of the linear portion of the geometric transformation operation. Support does not yet exist in the IRAF world coordinate system interface for the higher order distortion corrections that GEOTRAN is capable of performing.


TIMINGS

It requires approximately 70 and 290 cpu seconds to correct a 512 by 512 square image for geometric distortion using a low order coordinate surface and bilinear and biquintic interpolation respectively (Vax 11/750 fpa).


EXAMPLES

1. Register two images by transforming the coordinate system of the input
   image to the coordinate system of the reference image.
   The output image scale will be 1.0 and its size will be determined by
   the xmin, xmax, ymin, ymax parameters set in the task GEOMAP. The file
   "database" containing the record "m51.coo" was produced by GEOMAP.
   cl> geotran m51 m51.tran database m51.coo
2. Repeat the above command but set the output image scale to 2.0 reference
   images pixels per output image pixel.
   cl> geotran m51 m51.tran database m51.coo xscale=2.0 yscale=2.0
3. Correct an image for geometric distortion using an output scale of
   2 reference units per pixel and bicubic spline interpolation with no
   flux correction. 
   cl> geotran m51 m51.tran database m51.coo xscale=2. yscale=2. 
   >>> inter=spline3 flux-
4. Register a list of images using the set of transforms
   computed by GEOMAP. The input images, output images and transforms are
   listed in the files inlist, outlist and reclist respectively.
   cl> geotran @inlist @outlist database @reclist

BUGS

BUGS Support does not yet exist in the IRAF world coordinate system interface for the higher order distortion corrections that GEOTRAN is capable of performing.


SEE ALSO

imshift, magnify, rotate, imlintran, geomap, register,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu