About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/pix_dmtanpixtoworld.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 pix_dmTanPixToWorld Context: pixlib

Synopsis

Convert from FPC to World (celestial) coordinates by applying an aspect solution.

Syntax

Array_Type pix_dmTanPixToWorld( Array_Type pix, Array_Type asp,
Array_Type crpix, Array_Type cdelt )

Description

This routine converts a position in the Focal Plane coordinate (FPC) system to the World (Celestial) coordinate system. To perform this conversion the routine needs to know the aspect solution, knowledge of where the telescope was pointing at the time the photon was detected. The FPC system corresponds to the ( DETX, DETY ) columns of a Chandra event file.

The position, in the FPC system, is given by the two-element array pix, which has units of pixels. The pointing position is given in the three-element array asp, which should contain the ra, dec, and roll values in degrees. The crpix argument is a two-element array which gives the pixel location for the aimpoint. The cdelt argument is also a two-argument array and gives the pixel size in degrees. For the ACIS detectors you would use

crpix = [ 4096.5, 4096.5 ]

cdelt = [ -0.492, 0.492 ] / 3600.0

The return value is a two-element array which gives the World coordinates in degrees.

Example

chips> require("pixlib")
chips> pix_init_pixlib
chips> evt = readfile( "acis_evt2.fits" )
chips> asol = readfile( "acis_asol.fits" )
chips> detpos = [ evt.detx[0], evt.dety[0] ]
chips> asp = [ asol.ra[0], asol.dec[0], asol.roll[0] ]
chips> crpix = [ 4096.5, 4096.5 ]
chips> crdelt = [ -0.492, 0.492 ] / 3600
chips> wcspos = pix_dmTanPixToWorld( detpos, asp, crpix, crdelt )

In this example we have used the pix_dmTanPixToWorld() routine to convert the detector position of the first event in acis_evt2.fits into WCS (RA, Dec) values using the first element of the aspect solution. In reality you would want to use the aspect solution that was valid at the time the event was detected - which can be found since both files have a time column - rather than using an aritrary value as we did here.

Bugs

See the bugs page for the pixlib library on the CIAO website for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.