Table of Contents


wcs - coordinate transforms


wcs [parameter=value]


wcs is really a wrapper for AIPS worldpos/xypix WCS routines (worldpos(3NEMO) ), much like the testpos.c routine that is publicly available, but with a more typical NEMO command line user interface.


The following parameters are recognized in any order if the keyword is also given:
The reference coordinates (deg) at the reference pixel. Two numbers are required. These will typically be the equivalent of the crval in fits(5NEMO) .
The reference pixels (pixels). They can be floating point numbers and do not have to be on or inside a ’grid’. Two numbers are required. These will typically be the equivalent of the crpix in fits(5NEMO) .
Increment at the reference pixel. These will typically be the equivalent of the cdelt in fits(5NEMO) .
Rotation angle (deg) (from N through E) at the reference pixel These will typically be the equivalent of the crota in fits(5NEMO) ..
Projection type (SIN, TAN, ARC, NCP, GLS, MER, AIT). These will typically the last 4 characters in the ctype in fits(5NEMO) .
Output printf(3) -style format. [Default: %g].
Input Pixel number coordinates. Either one of pix= or pos= must be given, if this one is given, conversion to world coordinates is done. Note that pixels are 1-based in FITS, and 0-based in NEMO.
Input World Coordinates. If this one is given, conversion to pixel coordinates is done
Determines if the first coordinate, the longitude, should be printed in H:M:S (the default) or D:M:S format.


For a given $ra, $dec and $fitsfile, the corresponding pixel positions are computed.
set crpix1=‘fitshead $b | grep -w ^CRPIX1 | awk ’{print $3}’‘
set crpix2=‘fitshead $b | grep -w ^CRPIX2 | awk ’{print $3}’‘
set crval1=‘fitshead $b | grep -w ^CRVAL1 | awk ’{print $3}’‘
set crval2=‘fitshead $b | grep -w ^CRVAL2 | awk ’{print $3}’‘
set cdelt1=‘fitshead $b | grep -w ^CDELT1 | awk ’{print $3}’‘
set cdelt2=‘fitshead $b | grep -w ^CDELT2 | awk ’{print $3}’‘
set pix=(‘wcs ref=$crval1,$crval2 refpix=$crpix1,$crpix2 inc=$cdelt1,$cdelt2
rot=0 type=TAN pos=$ra,$dec‘)

Here is an example how to find out what the circumscribing "box" is around a curved RA-DEC plate in the TAN projection:

See Also

worldpos(3NEMO) , ccdtrace(1NEMO) , nemoinp(1NEMO) , nemoinpx(3NEMO) , tabdms(1NEMO) , impos(1MIRIAD) , xy2sky(1WCSTOOLS) , sky2xy(1WCSTOOLS)


src/image/wcs     - source code


Peter Teuben

Update History

14-oct-94    written    PJT
2-apr-96    V1.0 man page created    PJT
2-mar-03    V1.1 fixed pos->pix error; finally added to NEMO    PJT
4-mar-03    V1.2 allow hms/dms conversions using nemoinpx    PJT
7-may-04    V1.3 added hms= keyword       PJT

Table of Contents