.help sky2xy Feb95 ftools.heasarc
.ih
NAME
sky2xy - Given sky coordinates and a file, transform to X Y
.ih
USAGE
sky2xy infile xsky ysky
.ih
DESCRIPTION
This tasks takes the input sky coordinates and transforms them to
pixel X and Y 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 SKY2XY'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.  Either 
an image or a table with the appropriate 2 columns
are acceptable.  The default is an image in the primary array.
.le
.ls xsky =  [double]
The input value of the X sky coordinate (RA).
.le
.ls ysky =  [double]
The input value of the Y sky coordinate (DEC).
.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 (xpix = ) [double]
The returned X coordinate in pixels.
.le
.ls (ypix = ) [double]
The returned Y coordinate in pixels.
.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]
The returned file X axis coordinate projection type
.le
.ls (ctype2 = ) [string]
The returned file Y axis coordinate projection type
.le
.ls (equinox = ) [real]
The returned equinox for WCS used.
.le
.ls (crval1 = ) [double]
The returned X axis coord. value at reference pixel(deg).
.le
.ls (crval2 = ) [double]
The returned Y axis coord. value at reference pixel(deg).
.le
.ls (crpix1 = ) [double]
The returned X axis reference pixel location.
.le
.ls (crpix2 = ) [double]
The returned Y axis reference pixel location.
.le
.ls (cdelt1 = ) [double]
The returned X axis coord. incrementat reference pixel(deg).
.le
.ls (cdelt2 = ) [double]
The returned Y axis coord. incrementat reference pixel(deg).
.le
.ls (rot = ) [double]
The returned Celestial coord. 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 pixel values for RA=126.3 DEC=23.5 for the 
    image in the primary array of input.fits

    ft> sky2xy input.fits+0 126.3 23.5

2.  Calculate the pixel value for 123.4 5.3 using the DETX and DETY
    columns of first extension of the file input.fits.

    ft> sky2xy input.fits+1 123.4 5.3 xcol=detx ycol=dety sensecase=no

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