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

Synopsis

Module functions to set a model stack expression.

Syntax

Integer_Type set_source_expr([Integer_Type,]String_Type])
Integer_Type set_bg_expr([Integer_Type,]String_Type])
Integer_Type set_inst_expr([Integer_Type,]String_Type])
Integer_Type set_sinst_expr([Integer_Type,]String_Type])
Integer_Type set_binst_expr([Integer_Type,]String_Type])

Success/Error Return Values: 1/0

Arguments:

(1) Dataset number (default 1)

(2) A string expression

Note that if only one argument is provided, it is assumed to be a
string expression, and the dataset is assumed to be dataset 1.

Description

These functions set model stack expressions; set_sinst_expr and set_binst_expr set instrument model stack expressions for the source dataset only, and the background dataset only, respectively.

See the related Sherpa commands SOURCE, BACKGROUND, and INSTRUMENT for more information.

NOTE: In CIAO 3.1 the instrument model stack expression for the background dataset is required for simultanous filtering in energy/wave or fitting of PHA files.

Example 1

Specify the source model stack expression for dataset 3:

sherpa> PARAMPROMPT OFF
sherpa> GAUSS[g]
sherpa> POW[p]
sherpa> () = set_source_expr(3,"p+g")

Example 2

Specify a source model stack expression for dataset 1:

sherpa> () = set_source_expr("xswabs[xs1]*(pow[p]+gauss[g])")
sherpa> get_source_expr()
(xs1 * (p + g))

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.