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_model.sl.html
AHELP for Sherpa 4.1

set_model

Context: sl.sherpa

Synopsis

Set the model expression to be used for fitting a dataset

Syntax

set_model( [id]; model=NULL );

Description

The set_model command adds a model to the list of model components. It may be used to establish model components for use by commands such as eqwidth ("ahelp eqwidth").

  • 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; for a list of all available models, see "ahelp models"

Example 1

sherpa> set_model(xsphabs.abs1*powlaw1d.p1);

The model for the default dataset is set to photo-electric absorption times a 1-D powerlaw.

Example 2

sherpa> set_model("bkg1", gauss2d.g2d);

The model for dataset "bkg1" is set to a gauss2d model.

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.