IRAF help page for package images, program geomap

from NOAO geomap -- compute a spatial transformation functionUSAGEPARAMETERSDESCRIPTIONEXAMPLESBUGSSEE ALSO

geomap -- compute a spatial transformation function


USAGE

geomap input output xmin xmax ymin ymax


PARAMETERS

input

A list of text files containing the pixel coordinates of control points in the reference and input images. The control points are listed one per line in the form xref yref xin yin.

output

The name of the textfile database where the computed transformation will be stored. The output database record(s) are given the names of the individual text files specified by input.

xmin, xmax, ymin, ymax

The range of reference coordinates over which the coordinate transformation is valid. These must be set by the user. If the user is working in pixel units these limits should be the column and row limits of the reference image, e.g xmin = 1.0, xmax = 512.0 ymin = 1.0 and ymax = 512.0. If the default values of INDEF are used the minimum and maximum xref and yref values from the coordinate list input will be used.

function = polynomial

The type of analytic surface to be fit. The options are the following.

legendre

Legendre polynomials in x and y.

chebyshev

Chebyshev polynomials in x and y.

polynomial

Power series in x and y.

xxorder = 2, xyorder = 2, yxorder = 2, yyorder = 2

The order of the polynomials in x and y for the x and y fits. The default order and cross-term settings define a linear transformation in x and y, where the 6 coefficients can be interpreted in terms of an x and y shift, an x and y scale change and a rotation of the x and y axis.

xxterms = no, yxterms = no

Include cross terms in the x and y fits.

reject = 0.

The rejection limit in units of sigma. The default is no rejection.

calctype = real

The precision of coordinate transformation calculations. The options are real and double.

interactive = yes

In interactive mode the user may interact with the fitting process, e.g. change the order of the fit, reject points, display the data etc.

graphics = stdgraph

The graphics device.

cursor =

The graphics cursor.


DESCRIPTION

GEOMAP computes the transformation required to map the coordinate system of the reference image to the coordinate system of the input image. The coordinates of the reference points in the two images are listed in the text file(s) input one per line in the following format xref yref yin yin. The transformation has the following form.

    xin = f (xref, yref)
    yin = g (xref, yref)

The functions f and g are either a power series polynomial or a Legendre or Chebyshev polynomial surface of order xxorder and xyorder in x and yxorder and yyorder in y. Cross-terms are optional. The computation can be done in either real or double precision by setting calctype. Automatic pixel rejection may be enabled by setting reject > 0.0.

Xmin, xmax, ymin and ymax define the region of validity of the fit in the reference coordinate system and must be set by the user. These parameters can be used to reject out of range data before the actual fitting is done.

GEOMAP may be run interactively by setting interactive = yes and inputting commands by the use of simple keystrokes. In interactive mode the user has the option of changing the fit parameters and displaying the data graphically until a satisfactory fit has been achieved. The available keystroke command are listed below.

?	Print options
f	Fit the data and graph with the current graph type (g, x, r, y, s)
g	Graph the data and the current fit
x,r	Graph the x fit residuals versus x and y respectively
y,s	Graph the y fit residuals versus x and y respectively
d,u	Delete or undelete the data point nearest the cursor
o	Overplot the next graph
c	Toggle the constant x, y plotting option
t       Plot a line of constant x, y through the nearest data point	
l	Print xshift, yshift, xmag, ymag, xrotate, yrotate
q	Exit the interactive curve fitting

The parameters listed below can be changed interactively with simple colon commands. Typing the parameter name along will list the current value.

:show				List parameters
:function [value]	        Fitting function (chebyshev, legendre)
:xxorder :xyorder [value]	X fitting function xorder, yorder
:yxorder :yyorder [value]	Y fitting function xorder, yorder
:xxterms :yxterms [y/n]		Include cross-terms in X, Y fit
:reject [value]			Rejection threshold

The final fit is stored in a simple text file in a format suitable for use by GEOTRAN.

The transformation computed in this model is arbitrary and does not correspond to a physically meaningful model. However the first order terms can be given a simple geometrical interpretation as described below.

	xin = a + b * xref + c * yref
	yin = d + e * xref + f * yref

The coefficients can be interpreted as follows. Xref0, yref0, xin0, yin0 are the origins in the reference and input frames respectively.

	b = xmag * cos (xrotation)
	c = ymag * sin (xrotation)
	e = -xmag * sin (yrotation)
	f = ymag * cos (yrotation)
	a = xoin - b * xref0 - c * yref0 = xshift
	d = yoin - e * xref0 - f * yref0 = yshift


EXAMPLES

1. Compute the linear transformation between coordinate systems. A record called "m51.coo" will be written in the database file "database".

	cl> geomap m51.coo database 1. 512. 1. 512.

2. Compute the 3rd order transformation in x and y between two coordinate systems. A record called "m51.coo" will be written in the database file "database". This record supersedes the one of the same name written in example 1.

	cl> geomap m51.coo database 1. 512. 1. 512. xxo=4 xyo=4 
	>>> yxo=4 yyo=4 xxt+ yxt+ inter-


BUGS

The user should be aware that for high order fits the "polynomial" basis functions become very unstable. Switching to the "legendre" or "chebyshev" polynomials and/or going to double precision will usually cure the problem.


SEE ALSO

imshift, magnify, rotate, imlintran, register, geotran,


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