STScI Logo

revalfitx stsdas.hst_calib.foc.focgeom


NAME · USAGE · DESCRIPTION · PARAMETERS · EXAMPLES · BUGS · REFERENCES
SEE_ALSO

NAME

revalfitx -- Evaluate a transformation on a given set of points.

USAGE

revalfitx input1 entry input2 refentry output

DESCRIPTION

This task applies a transformation to a grid of points. The transformation is defined by an entry in a text data base file, and the grid of points is contained in an entry in a reseau table. The user specifies whether the transformation is to be applied forward (i.e., applying the transformation directly) or backward (i.e., the inverse transformation). The output is written to an entry in a reseau table; the output entry name is the same as the entry in the text data base file.

The transform may be either 1- or 2-dimensional. The presence of the AXIS keyword in the transform file is interpreted by the task to mean that the transform is 1-dimensional, and the absence of AXIS implies a 2-dimensional transform. A value of AXIS = 1 means that the transform applies to the X axis, while AXIS = 2 means that the transform applies to the Y axis. A further distinction is that a 1-dimensional transform contains the keyword SURFACE, while a 2-dimensional transform contains the keywords SURFACE1 and SURFACE2.

Note this is an ST-ECF amended version which was extended to handle 1-dimensional distortions such as those mapped by the noao.twodspec.longslit.fitcoords program, and was also modified to apply transforms backwards.

PARAMETERS

input[file name]
The input transform file, created by the rfitx task or the noao.twodspec.fitcoords task. This is a text data base file.
entry [string]
The name of the entry in the transform file input1.
input[file name]
The reseau table containing the grid on which the fit described by input1 will be evaluated.
refentry [string]
The name of the entry in the reseau table input2.
output [file name]
The output reseau table created by revalfitx.
(direction = "forwards") [string, Allowed values: forwards | backwards]
The direction of the transformation. The forward transform represents the way that the input1 file was calculated from the reference file. To develop a backward (i.e., inverse) transform, the program uses a primitive iterative search for points that would be mapped into the points in the input2 file under the effect of the transform.

EXAMPLES

1. Apply the distortions in entry "f48" in the text data base file stopt.fit to the positions in entry "dist" in the reseau table regular.tab. If stopt.fit contained details of the telescope's optical distortions and regular contained a regularly spaced reseau grid, then the output file opt will show the distortions produced by the Space Telescope's optics on a regular grid in the sky.


   fo> revalfitx stopt.fit f48 regular dist opt

2. Apply the distortions of entry "respos" in the file fitt to the entry "dist" in the reference grid called opt. The output should go to a file called final. If the reference grid opt contained optical chain distorted points and the input file fitt contained detector distortion, then the output file final will combine optical and detector distortions.


  fo> revalfitx fitt respos opt dist final

3. Transform the grid positions in the entry called "grid" in a reseau table called pix to X,Wavelength pairs; the transform entry "fit" in the file dispfit will be used. Results are to be written to a reseau table called wave.


  fo> revalfitx dispfit fit pix grid wave direction="forward"

4. Transform the X,Wavelength pairs in entry "x1" of the reseau table xlams to X,Y pixel pairs that will be written to the output table pix. The transform entry "fit" in the file dispfit will be applied backwards with iterative searching. (Examples 3 and 4 are the inverse of each other.)


fo> revalfitx dispfit fit xlams xl pix direction="backwards"

BUGS

The "backwards" option uses a rather primitive algorithm which may not work for unusual cases. In particular, there may be a problem if the transformation involves a large rotation.

REFERENCES

This task was written by David Giaretta. The "backwards" option was added by Richard Hook.

SEE ALSO

rfitx, noao.twodspec

Type "help focgeom option=sys" for a higher-level description of the focgeom package.

Type "help reseau" for more information about reseau files.


Source Code · Package Help · Search Form · STSDAS