GRTRANS(1) | User Commands | GRTRANS(1) |
grtrans - transforming coordinate lists or fitting such transformations
grtransh [options] <input> [-o <output>]
The main purpose of the program `grtrans` is to transform coordinate lists and fit transfomrations to input data. The transformation can be one of the following methods. 1. Evaluate polynomial functions (with arbitrary order)of two independent values. 2. Two dimensional spherical projection (converting to RA/DEC or longitude/latitude values to projected coordinates on a given tangent plane. 3. Two dimensional spherical de-projection (converting tangent planar coordinates to RA/DEC or longitude/latitude values). 4. Compose arbitrary polynomial functions of two independent values with arbitrary two-dimensional affine (or linear) transformations. The program also can be used to fit functions, namely fit the coefficients of arbitrary-order polynomial functions of two independent values or fit WCS distortion parameters.
In all of the above input/output file specifications, the replacement of the file name by "-" (a single minus sign) forces the reading from stdin or writing to stdout. Note that all parts of the any line after "#" (hashmark) are treated as a comment, therefore ignored. Note that there is no explicit switch for distinguishing between the fitting and the evaluating purposes of the program. If --input-transformation has been specified, the program implies that the user wants to evaluate a function described by this existing transformation file. On the other hand, if --output-transformation has been specified, the program fits the parameters of the function and stores the resulted transformation file as it specified by the argument of this option. In other words, if no WCS or spherical (de)projection declared by the directives of --wcs, one of these two switches should be given in the command line.
Note that in this case, the set of the appropriate FITS keyword=value pairs are written directly stdout, not in the file specified by the options --output or --output-transformation.
Here is an example for a complete astrometry problem which demonstrates the proper usage of the programs grmatch and grtrans. Let us assume that we have 1/ a reference star catalogue, named "catalog.dat", a file with four columns: the first is the identifier of the star, the second and third are the celestial coordinates (RA and DEC, in degrees), and the last is the magnitude of the stars; 2/ an astronomical image, named "img.fits" (not crucial for the astrometry itself, it is required only by the demonstration of the export of FITS WCS headers); and 3/ a list of decected stars (from "img.fits"), named "img.star", a file with three columns: the first two are the pixel coordinates and the third is an estimation of the flux (in ADUs, not in magnitudes).
Let us also denote the celestial coordinates of the center of the image by R and D, the RA and DEC values, in degrees and, for example let R=220 and D=25, a field in the Bootes. Let us also assume that the size of our field (both the catalog and the list of the deceted stars) is 3 degrees and there are approximately 4000-4000 stars both in the reference catalog and in the list of the detected stars. Because we have such a large amount of stars, one can use only a fraction of them for triangulation.
The first step is to make a projection from the sky, centered around the center of our image:
The second step is the point matching:
This grmach invocation matches the stars from projected reference catalog, "img.proj " and the detected stars. The "--order 4" specifies a fourth-order polynomial fit, which is, in practice, good for a field with the size of 3 degrees. The directives after "--weight" makes the magnitudes taken from the reference file to be used as a weight for fitting. This invocation yields one new file, "img.trans" which stores the fitted 4th-order polynomial transformation which transforms the projected coordinates to the system of the image.
The next step is the astrometrical transformation, we create a "local" catalog, which is the original catalog extended with the proper X and Y plate coordinates:
This invocation yields an other new file, "img.cat" which has 8 columns. The first six columns are the same as it was in "img.proj" (identifier, RA, DEC, magnitude and projected X, Y coordinates), the last two colums are the fitted plate coordinates. Then, the proper WCS headers can be determined by the following call:
The newly created file, img.wcs contains the FITS "keyword"="value" pairs, which can be exported to "img.fits" to have a standard header extended by the WCS information. For exporting, the program fiheader(1) can be used:
Note that the last two grtrans calls can be replaced by a single pipeline, when the file img.cat is not created:
Report bugs to <apal@szofi.net>, see also http://fitsh.net/.
Copyright © 1996, 2002, 2004-2008, 2010-2015; Pal, Andras <apal@szofi.net>
September 2016 | grtrans 1.0 (0.9.2@2016.09.23) |