m (Apal moved page grtrans:synopsis to man/grtrans) |
|||
(4 intermediate revisions by one user not shown) | |||
Line 83: | Line 83: | ||
:: Name of the input transformation file. | :: Name of the input transformation file. | ||
− | : '''--scale''' | + | : '''--scale''' >s< |
:: Scale factor. | :: Scale factor. | ||
Line 90: | Line 90: | ||
: '''--output-transformation''' <output-transformation-file> | : '''--output-transformation''' <output-transformation-file> | ||
− | :: Name of the output transformation file containing the result of the composition. | + | :: Name of the output transformation file containing the result of the composition. |
=== Options for spherical projection and deprojection: === | === Options for spherical projection and deprojection: === | ||
− | : '''--wcs''' [sin|arc|tan],ra=<R>,dec=<D>,[degrees|radians|scale= | + | : '''--wcs''' [sin|arc|tan],ra=<R>,dec=<D>,[degrees|radians|scale=>S< |
− | :: This set of directives specify the common parameters of the spherical projection or deprojection. The sin, arc and tan directives set the type of projection to orthographic, arc and gnomonic, respectively. The values after ra and dec (<R> and <D>) specify the center of the projection (right ascension and declination, respectively, in degrees). The degrees, radians or the scale= | + | :: This set of directives specify the common parameters of the spherical projection or deprojection. The sin, arc and tan directives set the type of projection to orthographic, arc and gnomonic, respectively. The values after ra and dec (<R> and <D>) specify the center of the projection (right ascension and declination, respectively, in degrees). The degrees, radians or the scale=>S< directives specify the scaling of the output. The directive degrees is equivalent to set scale=57.29577951308232087721 (180 over \Pi), this is the default. The directive radians is equivalent to set scale=1. |
: '''--col-radec''' <r>,<d> | : '''--col-radec''' <r>,<d> | ||
Line 104: | Line 104: | ||
: '''--col-out''' <>,<> | : '''--col-out''' <>,<> | ||
− | :: Column indices for the output values (which are X and Y for projection and RA, DEC for deprojection). | + | :: Column indices for the output values (which are X and Y for projection and RA, DEC for deprojection). |
=== Options for fitting WCS information: === | === Options for fitting WCS information: === | ||
Line 123: | Line 123: | ||
: 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). | : 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. | : 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 first step is to make a projection from the sky, centered around the center of our image: | ||
− | |||
− | |||
− | |||
:: grtrans '''--input''' catalog.dat '''--wcs''' tan,degrees,ra=220,dec=25 '''--col-radec''' 2,3 '''--col-out''' 5,6 '''--output''' img.proj | :: grtrans '''--input''' catalog.dat '''--wcs''' tan,degrees,ra=220,dec=25 '''--col-radec''' 2,3 '''--col-out''' 5,6 '''--output''' img.proj | ||
: The second step is the point matching: | : The second step is the point matching: | ||
− | |||
− | |||
− | |||
:: grmatch '''--reference''' img.proj '''--col-ref''' 5,6 '''--col-ref-ordering''' '''-4''' '''--input''' img.star '''--col-inp''' 1,2 '''--col-inp-ordering''' +3 '''--match-points''' '''--order''' 4 '''--triangulation''' auto,unitarity=0.01,maxnumber=1000,conformable '''--max-distance''' 1 '''--weight''' reference,column=4,magnitude,power=2 '''--comment''' '''--output-transformation''' img.trans | :: grmatch '''--reference''' img.proj '''--col-ref''' 5,6 '''--col-ref-ordering''' '''-4''' '''--input''' img.star '''--col-inp''' 1,2 '''--col-inp-ordering''' +3 '''--match-points''' '''--order''' 4 '''--triangulation''' auto,unitarity=0.01,maxnumber=1000,conformable '''--max-distance''' 1 '''--weight''' reference,column=4,magnitude,power=2 '''--comment''' '''--output-transformation''' img.trans | ||
: 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. | : 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: | : 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: | ||
− | |||
− | |||
− | |||
:: grtrans '''--input''' img.proj '''--col-xy''' 5,6 '''--input-transformation''' img.trans '''--col-out''' 7,8 '''--output''' img.cat | :: grtrans '''--input''' img.proj '''--col-xy''' 5,6 '''--input-transformation''' img.trans '''--col-out''' 7,8 '''--output''' img.cat | ||
: 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: | : 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: | ||
− | |||
− | |||
− | |||
:: grtrans '''--input''' img.cat '''--col-ref''' 2,3 '''--col-fit''' 7,8 '''--wcs''' tan,order=4,ra=220,dec=25 >img.wcs | :: grtrans '''--input''' img.cat '''--col-ref''' 2,3 '''--col-fit''' 7,8 '''--wcs''' tan,order=4,ra=220,dec=25 >img.wcs | ||
: 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: | : 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: | ||
− | |||
− | |||
− | |||
:: fiheader img.fits '''--rewrite''' '''--update''' $(cat img.wcs) | :: fiheader img.fits '''--rewrite''' '''--update''' $(cat img.wcs) | ||
: Note that the last two grtrans calls can be replaced by a single pipeline, when the file img.cat is not created: | : Note that the last two grtrans calls can be replaced by a single pipeline, when the file img.cat is not created: | ||
− | |||
− | |||
− | |||
:: grtrans '''--input''' img.proj '''--col-xy''' 5,6 '''--input-transformation''' img.trans '''--col-out''' 7,8 '''--output''' '''-''' | grtrans '''--input''' '''-''' '''--col-ref''' 2,3 '''--col-fit''' 7,8 '''--wcs''' tan,order=4,ra=220,dec=25 >img.wcs | :: grtrans '''--input''' img.proj '''--col-xy''' 5,6 '''--input-transformation''' img.trans '''--col-out''' 7,8 '''--output''' '''-''' | grtrans '''--input''' '''-''' '''--col-ref''' 2,3 '''--col-fit''' 7,8 '''--wcs''' tan,order=4,ra=220,dec=25 >img.wcs |