.help xy2sky Feb95 ftools.heasarc
.ih
NAME
xy2sky - Given the XY in a file, transform to sky coordinates (RA, DEC)
.ih
USAGE
xy2sky infile xpix ypix
.ih
DESCRIPTION
This tasks takes the input X and Y pixel values and transforms them to
sky coordinates using the World Coordinate System (WCS) keywords in
the input file.  The input file can either contain an image or 2
columns.  The results are both printed to the screen and recorded in
the parameter file.

The following information is written back into XY2SKY's parameter file.
The valid flag is set to 'no' at the beginning of the run and reset to
'yes' following successful completion:
.le
.ls            (valid = ) Is the following file WCS info valid?
.le
.ls         (radecsys = ) File World Coordinate System (WCS)
.le
.ls           (ctype1 = ) File X axis coordinate projection type
.le
.ls           (ctype2 = ) File Y axis coordinate projection type
.le
.ls          (equinox = ) File equinox for this WCS
.le
.ls           (crval1 = ) File X axis coord. value at ref pixel (deg)
.le
.ls           (crval2 = ) File Y axis coord. value at ref pixel (deg)
.le
.ls           (crpix1 = ) File X axis reference pixel location
.le
.ls           (crpix2 = ) File Y axis reference pixel location
.le
.ls           (cdelt1 = ) File X axis increment at ref pixel (deg/pixel)
.le
.ls           (cdelt2 = ) File Y axis increment at ref pixel (deg/pixel)
.le
.ls              (rot = ) File coordinate rotation angle (deg)
.le
.ih
PARAMETERS
.le
.ls infile [filename]
The name and extension of the FITS file containing the data to
transform.  Either an image or a table with the appropriate 2 columns
are acceptable.  The default is an image in the primary array.
.le
.ls xpix [double]
The X coordinate in pixels to be transformed to sky coordinates.
.le
.ls ypix [double]
The Y coordinate in pixels to be transformed to sky coordinates.
.le
.ls (xcol = X) [string]
The name of the X column to use if a table is specified.
.le
.ls (ycol = Y) [string]
The name of the Y column to use if a table is specified.
.le
.ls (valid = ) [boolean]
The returned true if this data is valid else false.
.le
.ls (radecsys = ) [string]
The returned WCS for the input file.
.le
.ls (ctype1 = ) [string]
Returned type of file X coordinate axis (CTYPE keyword).
.le
.ls (ctype2 = ) [string]
Returned type of file Y coordinate axis (CTYPE keyword).
.le
.ls (equinox = ) [real]
The returned equinox for WCS used.
.le
.ls (xsky = ) [double]
Returned value of the X sky coordinate (RA).
.le
.ls (ysky = ) [double]
Returned value of the Y sky coordinate (DEC).
.le
.ls (crval1 = ) [double]
The returned file X axis coord. value at reference pixel(deg).
.le
.ls (crval2 = ) [double]
The returned file Y axis coord. value at reference pixel(deg).
.le
.ls (crpix1 = ) [double]
The returned file X axis reference pixel location.
.le
.ls (crpix2 = ) [double]
The returned file Y axis reference pixel location.
.le
.ls (cdelt1 = ) [double]
The returned file X axis coord. incrementat reference pixel(deg).
.le
.ls (cdelt2 = ) [double]
The returned file Y axis coord. incrementat reference pixel(deg).
.le
.ls (rot = ) [double]
The returned file coordinate rotation angle (deg).
.le
.ls (sensecase = no) [boolean]
Whether to be case sensitive about column names.
.le
.ls (tchat = 10) [integer]
Terminal chattiness value.
.le
.ls (lchat = 0) [integer]
Log file chattiness level.  To initialize logging, set the environment
variable FLOGFILE to be the name of the file to contain the logging.
Add a + in the from to append information from each FTOOL.
.le
.ih
EXAMPLES 
.nf
1.  Calculate the sky coordinate of the pixel 126.3 128.4 for the
    image in the primary array of input.fits

    ft> xy2sky input.fits+0 126.3 128.4

2.  Calculate the sky coordinates for 1. 1. for the DETX and DETY
    columns of first extension of the file input.fits.

    ft> xy2sky input.fits+1 1.0 1.0 xcol=detx ycol=dety sensecase=no

.fi
.ih
BUGS
.ih
SEE ALSO
SKY2XY, F2DHISTO
.endhelp
