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/get_energy_axes.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 get_energy_axes Context: sherpa

Synopsis

Module functions to retrieve the energy grids of source and background datasets.

Syntax

{Struct_Type | Array_Type} get_energy_axes([Integer_Type])
{Struct_Type | Array_Type} get_energy_baxes([Integer_Type])
{Struct_Type | Array_Type} get_full_energy_axes([Integer_Type])
{Struct_Type | Array_Type} get_full_energy_baxes([Integer_Type])

Error Return Value: NULL

Arguments:

(1) data set number (default 1)

Description

In Sherpa parlance, a ``dataspace'' is an N-dimensional grid defined by the independent variables of the dataset (i.e., x_i in the expression y = f(x_0, x_1,...,x_(N-1))). Simple examples include the CHANNELS array in PHA datasets and the pixel numbers along each axis of FITS images.

The get_energy_axes() function retrieves the dataspace, or filtered data set axes of the appropriate data set (if no argument is given, the axes for data set 1 are retrieved). Regardless of the current Sherpa ANALYSIS setting, this function returns the dataspace in units of energy (keV). Otherwise, the function is similar to get_axes().

The function get_full_energy_axes() is similar to get_energy_axes(), except that get_full_energy_axes() returns the original, unfiltered dataspace in units of energy. (And get_energy_baxes() and get_full_energy_baxes() return filtered and unfiltered dataspaces for the background associated with the source data set, in units of energy.)

One may display data et al. on the same grid output by get_energy_axes using the Sherpa plotting commands LPLOT DATA et al.

Example

Read the PHA file with the ARF/RMF defined in the header (qso.pha). Obtain the energy axes information into "foo" and print content of "foo". Print the value of the third energy in "foo". The mid is NULL, so the final print command gives an error information.

sherpa> data qso.pha
sherpa> foo=get_energy_axes()
sherpa> print(foo)
axistype         =  Energy
axisunits        =  keV
lo               =  Float_Type[1024]
hi               =  Float_Type[1024]
mid              =  NULL
sherpa> print(foo.lo[2])
0.0292
sherpa> print(foo.mid[2])
Type Mismatch: Context requires an array.  Scalar not converted
Type Mismatch: print(foo.mid[2]);

Bugs

See the Sherpa bug pages online 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.