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 2008

URL: http://cxc.harvard.edu/sherpa4.1/set_source.py.html
AHELP for Sherpa 4.1

set_source

Context: py.sherpa

Synopsis

Set the source model expression to be used for fitting a dataset

Syntax

set_source([id], model)

Description

The set_source command sets the source model expression to be used for fitting the dataset.

  • id - the id of the dataset; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")
  • model - the model expression to use as the source; for a list of all available models, see "ahelp models"

Example 1

sherpa> set_source(powlaw1d.pl)

Set the source model of the default dataset to a 1-D powerlaw named "pl".

Example 2

sherpa> set_source(2, xswabs.a1 * xsbbody.b2)

Set the source model for dataset 2 to "xswabs.a1 * xsbbody.b2".

Example 3

sherpa>
set_source("src","bbody.bb+powlaw1d.pl+gauss1d.line1+gauss1d.line2")

The source model for dataset "src" is built from four different model components.

Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

Last modified: December 2008



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.