EXAMPLES · TIMINGS · SEE_ALSO

## NAME

tranback v1.91 -- Transform an X,Y position from output to input pixel position using the same conventions as drizzle

## USAGE

`tranback xout yout `

## PARAMETERS

- xout = [real]
- The X pixel position in an output frame to be transformed.

- yout = [real]
- The Y pixel position in an output frame to be transformed.

- (nxin = 800) [real]
- The X dimension of the input image (this is used to determine the centre which is the origin of the transformations).

- (nyin = 800) [real]
- The Y dimension of the input image (this is used to determine the centre which is the origin of the transformations).

- (nxout = 800) [real]
- The X dimension of the output image (this is used to determine the centre which is the origin of the transformations).

- (nyout = 800) [real]
- The Y dimension of the output image (this is used to determine the centre which is the origin of the transformations).

- (scale = 1.0) [real]
- Linear size of output pixels in terms of input pixels. A scale of 0.5 means a magnification of two from input to output.

- (xsh = 0.0) [real]
- A shift in X applied to the input position after the geometric transform. This shift may be defined either in the input or output frame, according to the value of the "shft_fr" parameter. Shifts are always along the axes of the image. Positive values shift the image to the right. Units are determined by the "shft_un" parameter.

- (ysh = 0.0) [real]
- A shift in Y applied to the input position after the geometric transform. This shift may be defined either in the input or output frame, according to the value of the "shft_fr" parameter. Shifts are always along the axes of the image. Positive values shift the image upwards. Units are determined by the "shft_un" parameter.

- (rot = 0.0) [real]
- The rotation in degrees anti-clockwise applied to the input image after the non-linear part of the transform was been performed. Whether or not the rotation is applied after or before the shifts is determined by the value of the "shft_fr" parameter.

- (coeffs = "") [file name]
- The name of a text file containing the coefficients for the geometrical transformation to be applied. These geometric transformations are always applied before the shifts, rotations and scale changes specified by other parameters.

- (sh_units = "input") [string]
- Whether the shifts are specified in units of "input" or "output" pixels.

- (shft_fr = "input") [string]
- The frame in which the shifts are applied, or to put it another way, whether to apply the rotation before the shifts. If "output" the input image center is mapped to the center of the output grid, rotated about that center and then shifted along the grid of the output image. If "input" then the input image center is mapped to the center of the output image, shifted along the grid of the output image and then rotated about the center of the output image. See notes below for a definition of the center of rotation.

- (xgeoim = "") [file name]
- The name of an additional distortion correction image, in the X-direction. This is a real array, the same size as the input image, which represents an additional shift in the X direction which is applied after the polynomial distortion coefficients but before the linear transformation.

- (ygeoim = "") [file name]
- The name of an additional distortion correction image, in the Y-direction. This is a real array, the same size as the input image, which represents an additional shift in the Y direction which is applied after the polynomial distortion coefficients but before the linear transformation.

- (align = "center") [string]
- Whether the reference point used in transforming the input image coordinates to the output ones is aligned on the corner or center of a pixel. If the task is being used to mimic shift-and-add this should be set to "corner" otherwise, and particularly when performing interlacing, it should be set to "center". More details of the definition of the image centers are given below.

- (lambda = 555.0) [real]
- The wavelength (in nm) associated with the image. This is used for the "Trauger" style coefficients for which the distortion is a weak function of wavelength. It is only relevant for WFPC2 and is otherwise ignored.

## DESCRIPTION

This task transforms an X,Y position, assumed to be on an output virtual image of size nxout,nyout, back onto a virtual input image of size nxin,nyin using the conventions of the drizzle task. So, if an object on an input image at a certain position is drizzled with a given set of parameters then the position of that object on the output can be transformed back to where it came from using tranback with the same parameter values. The simple forward transformation can be accomplished using the companion task traxy.

Note that traxy and tranback are inverse operations but the parameters are specified in exactly the same way and don't need to be reversed. This task is iterative, using a crude iterative search method, and may not behave well in extreme cases.

## IMPORTANT NOTE ON SECONDARY PARAMETERS

Versions of Tranback from V1.0 also use the "secondary geometric parameters" which are held in the pset dr2gpar. These allow for the possibility of an additional transformation after the standard geometrical distortion correction and linear transformation have been applied. More details of the use and value of this feature are given in the help file for drizzle which should be consulted. Note that these parameters may be inspected and modified using "epar dr2gpar" - they are not accessible from the tranback parameter list.

Users are warned to check the values of the parameters in this pset! If they are set they will be used and a warning message issued but they can easily be forgotten and hence lead to curious results.

## EXAMPLES

If a star is at the position 542.649,1071.763 on an output drizzled image where was it on the original input WFPC2 chip? First the parameters of the tranback task are set to match those used by drizzle then when the image was created, then: dr> tranback mode=h + TRANBACK Version 1.3 (11th March 2003) -Opening coefficients file: drizzle$coeffs/wf3-trauger Xin,Yin: 123.000 456.000 Xout,Yout: 542.649 1071.764

## TIMINGS

It is, as one would expect, very quick!