.help fsaoi Jun92 ftools.fimage
.ih
NAME
fsaoi --  Translate an SAOImage region file to an input file for FSELECT
.ih
USAGE
fsaoi infile outfile
.ih
DESCRIPTION
This task reads a region file created by SAOImage, and translates it 
into the correct format for input to FSELECT.  Since SAOImage's output
is in pixel coordinates rather than the coordinates of the image file,
FSAOI will translate the values using the keywords: CRVALn, CRPIXn
and CDELTn, as well as the names of the columns corresponding to the
axes of the image (XCOLNAME and YCOLNAME).  The task F2DHISTO writes
the correct values of these keywords in the primary array header.
If keywords are
missing from the primary header of the input imagefile, they
can be supplied to this task via hidden parameters.  The default
hidden parameters correspond to no transformation.  If the keywords
are present in the image file, the hidden parameter values are
ignored.
.ih
PARAMETERS
.ls infile [filename]
The name of the ASCII SAOImage region file to be translated.
.le 
.ls outfile [filename] 
The name of the output FSELECT file.
.le
.ls imgfile [filename]
The name of the file containing the original image.  This the header of
this file contains all the information needed to translate SAOImage's
pixel coordinate to the original file's coordinates.  If this file
is not available, or does not contain the correct keywords, 
the user will have to specify the values needed
through hidden parameters.
.le
.ls (xcolname="X") [string]
The name of the column corresponding to the X axis of the original image.
.le
.ls (ycolname = "Y") [string]
The name of the column corresponding to the Y axis of the original image.
.le
.ls (crval1 = 1.) [real]
Coordinate value of X reference pixel
.le
.ls (crval2 = 1.) [real]
Coordinate value of Y reference pixel
.le
.ls (crpix1 = 1) [integer]
X axis reference pixel number
.le
.ls (crpix2 = 1) [integer]
Y axis reference pixel number
.le
.ls (cdelt1 = 1.) [real]
X axis coordinate increment
.le
.ls (cdelt2 = 1.) [real]
Y axis coordinate increment
.ih
EXAMPLES
1.  Read the file saoimage.reg and write the appropriate FSELECT 
expression to the file fselect.in
.nf

     ft> fsaoi saoimage.reg fselect.in
.fi
.ih
BUGS
FSAOI will not produce correct results for images with different 
scale factors in the X and Y direction (CDELT1 .ne. CDELT2) if
the selected region includes a rotation angle.
.ih
SEE ALSO
fselect, f2dhisto
.endhelp
