WCSCTRAN, MSCCTRAN, etc outputing RA in hours
Frank Valdes wrote on Oct 25, 1999
Q: I have a question regarding conversion of the x,y pixel positions of an object (obtained with photcal or SExtractor) to ra and dec in hours and degrees. I have attempted to use mscctran to do this but the output seems to be in degrees for both ra and dec. Is this correct? Can this be changed to output ra in hours or will have to do this after the fact? I beleive I did the msczero and msccmatch steps properly. A: MSCCTRAN is a version of WCSCTRAN which has another coordinate system type "astrometry" (arc seconds from the tangent point). I mention this so you know you can read the help page for WCSCTRAN or use that task if you want. In both cases the "native" units for both ra and dec are degrees. To read hours on input use "hours" for the units parameter. To get hours on output (which is what you are asking) you use the format. The format specification is described under PRINTF or WCSCTRAN. They don't specify directly that there are two other codes H and M. The capitalized versions of h and m divide the value by 15 before formating; i.e. convert to hours. So the typical output format for MSCCTRAN to get hours and degrees from pixel input is "%.2H %.1h". This specifies convert the ra value to hours and print in hms with 2 digits of subseconds and print the dec value in dms with one digit of subseconds. Note that this same thing applies to various other tasks that can print WCS values (IMEXAM, RIMCUR, etc).
Last post on Oct 25, 1999