XY2SKY (Feb95) ftools.heasarc XY2SKY (Feb95) NAME xy2sky - Given the XY in a file, transform to sky coordinates (RA, DEC) USAGE xy2sky infile xpix ypix 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: (valid = ) Is the following file WCS info valid? (radecsys = ) File World Coordinate System (WCS) (ctype1 = ) File X axis coordinate projection type (ctype2 = ) File Y axis coordinate projection type (equinox = ) File equinox for this WCS (crval1 = ) File X axis coord. value at ref pixel (deg) (crval2 = ) File Y axis coord. value at ref pixel (deg) (crpix1 = ) File X axis reference pixel location (crpix2 = ) File Y axis reference pixel location (cdelt1 = ) File X axis increment at ref pixel (deg/pixel) (cdelt2 = ) File Y axis increment at ref pixel (deg/pixel) (rot = ) File coordinate rotation angle (deg) PARAMETERS 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. xpix [double] The X coordinate in pixels to be transformed to sky coordinates. ypix [double] The Y coordinate in pixels to be transformed to sky coordinates. (xcol = X) [string] The name of the X column to use if a table is specified. (ycol = Y) [string] The name of the Y column to use if a table is specified. (valid = ) [boolean] The returned true if this data is valid else false. (radecsys = ) [string] The returned WCS for the input file. (ctype1 = ) [string] Returned type of file X coordinate axis (CTYPE keyword). (ctype2 = ) [string] Returned type of file Y coordinate axis (CTYPE keyword). (equinox = ) [real] The returned equinox for WCS used. (xsky = ) [double] Returned value of the X sky coordinate (RA). (ysky = ) [double] Returned value of the Y sky coordinate (DEC). (crval1 = ) [double] The returned file X axis coord. value at reference pixel(deg). (crval2 = ) [double] The returned file Y axis coord. value at reference pixel(deg). (crpix1 = ) [double] The returned file X axis reference pixel location. (crpix2 = ) [double] The returned file Y axis reference pixel location. (cdelt1 = ) [double] The returned file X axis coord. incrementat reference pixel(deg). (cdelt2 = ) [double] The returned file Y axis coord. incrementat reference pixel(deg). (rot = ) [double] The returned file coordinate rotation angle (deg). (sensecase = no) [boolean] Whether to be case sensitive about column names. (tchat = 10) [integer] Terminal chattiness value. (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. EXAMPLES 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 BUGS SEE ALSO SKY2XY, F2DHISTO