increasing precision of cctran output
jsimon wrote on Jul 30, 2008
Hi,
I'm using images.imcoords.cctran to transform (x,y) coordinates on an image to RA and Dec (the plate solution has distortion terms, so that the nonlinear part is important). One of the parameters of cctran is min_sig, described as the number of significant digits in the output file. The default value of min_sig is 7, corresponding to 0.1". I would like to get one more decimal place in the output, but no matter what number I set min_sig to, it gives me the same output with 0.1" precision. Is there something I'm missing that would actually increase the precision? An example parameter set is included below:
input = Pal13.fits.coo.1 The input coordinate files
output = Pal13.fits.coo.1.rd The output coordinate files
database= Pal13.mscred.db The input database file
solution= Pal13.newastrom.fits The input plate solutions
(geometr= geometric) Transformation type (linear,geometric)
(forward= yes) Transform x / y to ra / dec (yes) or vice versa
(xref = INDEF) The X reference pixel
(yref = INDEF) The Y reference pixel
(xmag = INDEF) The X axis scale in arcsec per pixel
(ymag = INDEF) The Y axis scale in arcsec per pixel
(xrotati= INDEF) The X axis rotation angle in degrees
(yrotati= INDEF) The Y axis rotation angle in degrees
(lngref = INDEF) The ra / longitude reference coordinate in lngun
(latref = INDEF) The dec / latitude reference coordinate in latun
(lngunit= ) The input / output ra / longitude reference coor
(latunit= ) The input / output dec / latitude reference coor
(project= tan) The sky projection geometry
(xcolumn= 1) Input column containing the x / ra / longitude c
(ycolumn= 2) Input column containing the y / dec / latitude c
(lngform= ) Output format of the ra / longitude / x coordina
(latform= ) Output format of the dec / latitude / y coordina
(min_sig= 10) Minimum precision of the output coordinates
(mode = ql)
Thanks,
Josh
I'm using images.imcoords.cctran to transform (x,y) coordinates on an image to RA and Dec (the plate solution has distortion terms, so that the nonlinear part is important). One of the parameters of cctran is min_sig, described as the number of significant digits in the output file. The default value of min_sig is 7, corresponding to 0.1". I would like to get one more decimal place in the output, but no matter what number I set min_sig to, it gives me the same output with 0.1" precision. Is there something I'm missing that would actually increase the precision? An example parameter set is included below:
input = Pal13.fits.coo.1 The input coordinate files
output = Pal13.fits.coo.1.rd The output coordinate files
database= Pal13.mscred.db The input database file
solution= Pal13.newastrom.fits The input plate solutions
(geometr= geometric) Transformation type (linear,geometric)
(forward= yes) Transform x / y to ra / dec (yes) or vice versa
(xref = INDEF) The X reference pixel
(yref = INDEF) The Y reference pixel
(xmag = INDEF) The X axis scale in arcsec per pixel
(ymag = INDEF) The Y axis scale in arcsec per pixel
(xrotati= INDEF) The X axis rotation angle in degrees
(yrotati= INDEF) The Y axis rotation angle in degrees
(lngref = INDEF) The ra / longitude reference coordinate in lngun
(latref = INDEF) The dec / latitude reference coordinate in latun
(lngunit= ) The input / output ra / longitude reference coor
(latunit= ) The input / output dec / latitude reference coor
(project= tan) The sky projection geometry
(xcolumn= 1) Input column containing the x / ra / longitude c
(ycolumn= 2) Input column containing the y / dec / latitude c
(lngform= ) Output format of the ra / longitude / x coordina
(latform= ) Output format of the dec / latitude / y coordina
(min_sig= 10) Minimum precision of the output coordinates
(mode = ql)
Thanks,
Josh
Francisco Valdes wrote on Jul 30, 2008
Hello Josh,
I believe you need to use the format parameter. You might also like that it can produce sexigesimal coordinates and/or RA in hours instead of degrees.
See wcsctran help for information about the format syntax. It is similar to C or other modern languages with the addiiton of the h/H, m/M formats. You can use printf to test formats.
Yours,
Frank Valdes
I believe you need to use the format parameter. You might also like that it can produce sexigesimal coordinates and/or RA in hours instead of degrees.
%.3H -- format to sexigesimal hours with 3 places past the seconds; i.e. milliseconds of time
%.2h -- format to sexisimal degrees with 2 places past the seconds; i.e. centiseconds of degree
%.9g -- decimal with 9 digits of precision
See wcsctran help for information about the format syntax. It is similar to C or other modern languages with the addiiton of the h/H, m/M formats. You can use printf to test formats.
ecl> printf ("%.2M\n", 1.234567)
0:04.94
ecl> printf ("%.2m\n", 1.234567)
1:14.07
ecl> printf ("%.2H\n", 1.234567)
0:04:56.30
ecl> printf ("%.2h\n", 1.234567)
1:14:04.44
Yours,
Frank Valdes
jsimon wrote on Jul 30, 2008
Thanks, Frank, that appears to work. For reference, it's also necessary to set the lngunit (hours) and latunit (degrees) parameters in addition to lngform and latform to get the desired output.
Josh
Josh
Last post on Jul 30, 2008