Skip to the navigation links
Last modified: December 2009

AHELP for CIAO 4.2


Context: pixlib


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


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


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.

The pixlib module is not available by default; to use it in a S-Lang program, it must be loaded using the S-Lang require() function:



slsh> detpos = [ evt.detx[0], evt.dety[0] ];
slsh> asp = [ asol.ra[0], asol.dec[0], asol.roll[0] ];
slsh> crpix = [ 4096.5, 4096.5 ];
slsh> crdelt = [ -0.492, 0.492 ] / 3600;
slsh> 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 "evt" into WCS (RA, Dec) values using the first element of the aspect solution ("asp"). 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.


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

See Also

pix_apply_aspect, pix_deapply_aspect, pix_dmtanpixtoworld, pix_dmtanworldtopix

Last modified: December 2009