|
|
|
|
SynopsisThe S-Lang interface to the CXC pixlib library DescriptionThe pixlib module is the interface between the S-Lang interpreter (see "ahelp slang") and the CXC pixlib library (see "ahelp dmcoords" for the more-limited tool-based interface to the pixlib library). This document provides an overview of the features of the pixlib module, and tips for using it efficiently in a S-Lang program. Detailed descriptions of each function are provided by individual ahelp entries. 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: require("pixlib");Functions provided by the moduleThe following functions are provided by the module; use "ahelp <function>" to get a detailed description of a function:
Pixlib and Chandra Coordinate SystemsA number of coordinate systems have been defined for use with Chandra. The pixlib module makes conversion between these systems much easier, but the user must first familiarize themselves with the various systems, which are described in Coordinate Systems Paper I: Imaging. Setting up pixlib geometryThe pixlib module must be initialized, after it is loaded, with the pix_init_pixlib call. This sets the default geometry for Chandra in flight. Most of these values (those set by the pix_set_tdetsys, pix_set_fpsys, or pix_set_gdpsys calls) should not be changed. The Science Instrument Module (SIM) position, however, must be set correctly for each observation and aspect solution in order to properly convert between sky and detector coordinates. This is done using the pix_set_aimpoint() call (see example below) which uses the nominal SIM_X, SIM_Y, and SIM_Z values (available in the event file header) and the aspect solution DY and DZ values as inputs. Restarting pixlibPixlib should not be closed and re-initialized within a single session, as this causes internal variables to be mis-set and incorrect results produced. This bug will be addressed in a future release; the simple workaround is to call pix_init_pixlib only once, immediately after the call to require("pixlib"). Example
slsh> require("pixlib");
slsh> pix_init_pixlib();
slsh> pix_disp_config();
****** PIXLIB System Configuration ******
Telescope = flight
Focal Length (mm) = 10070.000
Detector = ACIS
Focal Plane Sys. = FP-1.1
Tiled Detector Plane Sys. = ACIS-2.2
SIM Offset (mm) = (0.684 0.75 236.552)
Aim Point(AI1) (mm) = (-0.782348 0 -237.5)
Grating Arm = HEG
Grating Order = 1
Dispersion Plane Sys. = ASC-GDP-1.1
Rowland Circle (mm) = 8632.48BugsSee the bugs page for the pixlib library on the CIAO website for an up-to-date listing of known bugs. See Also
|
![]() |
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. |