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

Synopsis

Accessing data with the Sherpa/S-Lang module functions.

Description

Sherpa, the modeling and fitting application of the Chandra Interactive Analysis of Observations (CIAO) software package, was originally designed as a `black box': data were to be input from a file, and analyzed, with results possibly written out to disk; however, the data themselves were not to be manipulated once input. The embedding of the S-Lang scripting language into Sherpa allows us to move from this `black box' paradigm to one in which numeric data can be freely moved into and out of the box, and freely manipulated outside that box (e.g., with S-Lang functions). This movement of data requires the new functionality of the Sherpa/S-Lang module.

There are six principal types of Sherpa/S-Lang module functions, differentiated by prefix:

Summary of Sherpa/S-Lang Module Function Types

Name Description
get Functions for retrieving data and settings from Sherpa
is Query functions
list Functions for retrieving string-based information from Sherpa and presenting it in tabular form
load Functions for loading datasets, file-based models, etc., into Sherpa
run An extension of get functions designed to run a computationally intensive task (e.g., PROJECTION) and after completion return numerical information to the user. (Each run function has a corresponding get function, which simply retrieves the information from the most recent previous run.)
set Functions for putting data into Sherpa, or changing settings

Miscellaneous functions which are not classified into one of the six types above include:

Other Sherpa/S-Lang Module Functions

Name Description
compute_errors Estimate errors for data given the current Sherpa statistic setting
compute_statistic Compute a statistic given a data and model array, and the current Sherpa statistic setting
create_model | create_inst_model Create a new instantiation of a Sherpa model
restore_unc Restore the default settings of the configuration variable sherpa.unc
restore_proj Restore the default settings of the configuration variable sherpa.proj
restore_cov Restore the default settings of the configuration variable sherpa.cov
restore_intunc Restore the default settings of the configuration variable sherpa.intunc
restore_intproj Restore the default settings of the configuration variable sherpa.intproj
restore_regunc Restore the default settings of the configuration variable sherpa.regunc
restore_regproj Restore the default settings of the configuration variable sherpa.regproj

CHANGES IN CIAO 3.2

The Sherpa module can now be loaded by using the require("sherpa"); statement, although the previous method (loading with the import command) still works.

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.