xyeq -- Get equatorial coordinates from pixel positions.
xyeq iminfo image coeffile xyfile
This task will compute the equatorial coordinates for a given set of (X,Y) coordinates based on the plate solution coefficients taken from the following sources: image header, original coefficients, new coefficients, the CD matrix, or the ASCII file (coeffile) containing coefficients.
Output is sent to the terminal screen and consists of the X,Y input pixel values; the RA_nsol,'DEC_nsol' from the new plate solution; RA_osol,'DEC_osol' from the original plate solution; or RA_cd,'DEC_cd' from the CD matrix values.
It is convenient to use epar to set up the parameters because the flags made the arguments position difficult to handle.
Astrometic solution file Mon 15:43:16 16-Jan-89 CRPIX1 256. # X reference pixel CRPIX2 256. # Y reference pixel CRVAL1 15.858809471130371 # RA of ref. point [degrees] CRVAL2 36.877372741699219 # DEC of ref. point [degrees] XPIXELSZ 25.284451028631174 # X pixel size [microns] YPIXELSZ 25.28445104137063 # Y pixel size [microns] PLATESCL 67.199989318847656 # plate scale [arcs/mm] XCOEFF1 -67.165285989700821 # 1st coeff [arcs/mm] in X XCOEFF2 -0.12163416492744184 # 2nd XCOEFF3 8.3026349034598379E-4 YCOEFF1 67.166110959926988 # 1st coeff [arcs/mm] in Y YCOEFF2 -0.25883516231503645 # 2nd YCOEFF3 0.16833370472960918 #All keywords should start in the first column. The file begins with a title line followed by a blank line. The XCOEFF and YCOEFF values are analogous to the NAMDX and NAMDY values in the image header. The YCOEFF should follow the XCOEFF and the indexing is in ascending order (but not necessarily sequential).
A format specification has the form "%w.dCn", where w is the field width, d is the number of decimal places or the number of digits of precision, C is the format code, and n is radix character for format code "r" only. The w and d fields are optional. The format codes C are as follows:
b boolean (YES or NO) c single character (c or '\c' or '\0nnn') d decimal integer e exponential format (D specifies the precision) f fixed format (D specifies the number of decimal places) g general format (D specifies the precision) h hms format (hh:mm:ss.ss, D = no. decimal places) m minutes, seconds (or hours, minutes) (mm:ss.ss) o octal integer rN convert integer in any radix N s string (D field specifies max chars to print) t advance To column given as field W u unsigned decimal integer w output the number of spaces given by field W x hexadecimal integer z complex format (r,r) (D = precision) Conventions for w (field width) specification: W = n right justify in field of N characters, blank fill -n left justify in field of N characters, blank fill 0n zero fill at left (only if right justified) absent, 0 use as much space as needed (D field sets precision) Escape sequences (e.g. "\n" for newline): \b backspace (not implemented) \f formfeed \n newline (crlf) \r carriage return \t tab \" string delimiter character \' character constant delimiter character \\ backslash character \nnn octal value of character Examples %s format a string using as much space as required %-10s left justify a string in a field of 10 characters %-10.10s left justify and truncate a string in a field of 10 characters %10s right justify a string in a field of 10 characters %10.10s right justify and truncate a string in a field of 10 characters %7.3f print a real number right justified in floating point format %-7.3f same as above but left justified %15.7e print a real number right justified in exponential format %-15.7e same as above but left justified %12.5g print a real number right justified in general format %-12.5g same as above but left justified %h format as nn:nn:nn.n %15h right justify nn:nn:nn.n in field of 15 characters %-15h left justify nn:nn:nn.n in a field of 15 characters %12.2h right justify nn:nn:nn.nn %-12.2h left justify nn:nn:nn.nn %H / by 15 and format as nn:nn:nn.n %15H / by 15 and right justify nn:nn:nn.n in field of 15 characters %-15H / by 15 and left justify nn:nn:nn.n in field of 15 characters %12.2H / by 15 and right justify nn:nn:nn.nn %-12.2H / by 15 and left justify nn:nn:nn.nn \n insert a newline
1. Set your parameters with epar, and then direct the output from this task to a file.
ga> xyeq mode=h > outfile2. Output the RA and DEC coordinates for an image in sexagesimal degrees.
cl> xyeq ra_format=%12.2h dec_format=%12.2h 19:47:12.25 33:15:03.66 19:43:12.10 33:14:38.06 19:45:12.40 33:15:56.033. Output the RA in sexagesimal hours and DEC in sexagesimal degrees for an image.
cl> xyeq ra_format=%12.2H dec_format=%12.2h 13:47:12.25 47:15:03.66 13:47:12.10 47:15:38.06 13:47:12.40 47:15:56.03
eqxy, makewcs, pltsol