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

Synopsis

Provides a number of S-Lang functions useful for Sherpa.

Syntax

calc_kcorr()

groupByCounts()
groupBySNR()
groupAdaptively()
groupAdaptiveSNR()

get_source_components()
set_dataspace()

and the variables:

_sherpa_utils_version_string
_sherpa_utils_version

Description

The sherpa_utils.sl package contains S-Lang routines that may be useful to the Sherpa user. They can be loaded into Sherpa by saying, once per session,

  require ("sherpa");

The "NOTES" section contains further information on installing this package.

The available routines are:

Routine Information
calc_kcorr() Calculates the k-correction for a given model, redshift, and energy range. See "ahelp calc_kcorr" for more information.
groupByCounts() Groups the dataset so that each group contains at least the specified number of counts. See "ahelp groupByCounts" for more information.
groupBySNR() Groups the dataset so that each group has at least the specified signal-to-noise value. See "ahelp groupByCounts" for more information.
groupAdaptively() Adaptively group the dataset so that each group contains at least the specified number of counts. See "ahelp groupByCounts" for more information.
groupAdaptiveSNR() Adaptively groups the dataset so that each group has at least the specified signal-to-noise value. See "ahelp groupByCounts" for more information.
get_source_components() Returns an array containing the names of the model compunents used to define the source expression for a dataset.
set_datapace() Sets the X-axis grid used for a dataset (see Sherpa's DATASPACE command)

See the individual ahelp pages for each function for more information on their use.

The available variables are:

Variable Information
_sherpa_utils_version_string Contains the version of the script as a string in the format "a.b".
_sherpa_utils_version Contains the version of the script as an integer equal to a*100 + b (when _sherpa_utils_version_string is "a.b").

CHANGES

Version 1.26 (CIAO 3.2)

Version 1.26 of sherpa_utils.sl was released with CIAO 3.2. The script can now be loaded by saying

require("sherpa_utils");

rather than having to use

() = evalfile("sherpa_utils.sl");

The old method will still work.

Version 1.25 (CIAO 3.1)

Version 1.25 of sherpa_utils.sl was released with CIAO 3.1.

To take advantage of the set_groups() function in Sherpa and the group module, the following functions were added: groupByCounts(), groupBySNR(), groupAdaptively(), and groupAdaptiveSNR(). See "ahelp groupByCounts" for further details.

The documentation for the calc_kcorr(), get_source_components(), and set_dataspace() routines have been moved to separate ahelp files: try 'ahelp calc_kcorr', 'ahelp get_source_components', and 'ahelp set_dataspace'.

Version 1.23 (CIAO 3.0.2)

Version 1.23 was released in January 2004 and required CIAO 3.0.2.

The get_source_components() routine has been added to the package. The set_dataspace() command now uses set_axes() to set the axis grid.

NOTES

Downloading the sherpa_utils package

This script is not an official part of the CIAO release but is made available as "contributed" software via the CIAO scripts page which contains instructions on how to install the software.

Loading the package into Sherpa

The routines can be loaded into Sherpa by calling

  require ("sherpa");

If you want the routines available every time you use Sherpa then you can add this line to your Sherpa resource file (see section V of 'ahelp sherpa' for the location of this file). It is safe to call this multiple times since only the first call loads the package; the remaining calls are ignored.

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.