next up previous contents FITSIO Home
Next: File Checksum Subroutines Up: Advanced Interface Subroutines Previous: High-Level Table Access Subroutines

Celestial Coordinate System Subroutines  

The following subroutines are provided to help calculate the transformation between pixel location in an image and the corresponding celestial coordinates on the sky. These support the following standard map projections: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, and -AIT (these are the legal values for the coordtype parameter). These routines are based on similar functions in Classic AIPS. All the angular quantities are given in units of degrees. (Note: these subroutines are provisional and may change slightly in a future release of FITSIO).

1
Get the values of all the standard FITS celestial coordinate system keywords from the header of a FITS image (i.e., the primary array or an image extension). These values may then be passed to the subroutines that perform the coordinate transformations.

        FTGICS(unit, > xrval,yrval,xrpix,yrpix,xinc,yinc,rot,coordtype,status)

2
Get the values of all the standard FITS celestial coordinate system keywords from the header of a FITS table where the X and Y (or RA and DEC coordinates are stored in 2 separate columns of the table. These values may then be passed to the subroutines that perform the coordinate transformations.

        FTGTCS(unit,xcol,ycol, >
               xrval,yrval,xrpix,yrpix,xinc,yinc,rot,coordtype,status)

3
Calculate the celestial coordinate corresponding to the input X and Y pixel location in the image.

        FTWLDP(xpix,ypix,xrval,yrval,xrpix,yrpix,xinc,yinc,rot,
                          coordtype, > xpos,ypos,status)

4
Calculate the X and Y pixel location corresponding to the input celestial coordinate in the image.

        FTXYPX(xpos,ypos,xrval,yrval,xrpix,yrpix,xinc,yinc,rot,
                          coordtype, > xpix,ypix,status)


next up previous contents FITSIO Home
Next: File Checksum Subroutines Up: Advanced Interface Subroutines Previous: High-Level Table Access Subroutines