mPix2Coord

Description:
Takes an image FITS header template and a pixel (x,y) coordinate, and outputs the corresponding sky location.

Newer mExamine can do the same and more for real image files.

Syntax:
mPix2Coord [-d] template.hdr ixpix jypix

Switches:

-d
Print out additional debugging information

Arguments:

template.hdr
ASCII header template describing the image (either a FITS image, or a JPEG file created from the FITS file)
ixpix
X coordinate (pixel location) on image
jypix
Y coordinate (pixel location) on image
Results:
[struct stat="OK", lon=ra, lat=dec]
where ra, dec are the sky coordinates that correspond to the input pixel.

Examples:

To find out what the coordinates are at the 100,130 pixel on an image defined by template.hdr:

$ mPix2Coord template.hdr 100 130
[struct stat="OK", lon=0.027777, lat=0.036110]

Return Codes:

  • [struct stat="OK", lon=ra, lat=dec]
  • [struct stat="ERROR", msg="Usage: mPix2Coord [-d] template.hdr ixpix jypix"]
  • [struct stat="ERROR", msg="Bad template: template.hdr"]
  • [struct stat="ERROR", msg="Output wcsinit() failed."]