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/guess.py.html
AHELP for Sherpa 4.1

guess

Context: py.sherpa

Synopsis

Estimate initial parameter values and ranges

Syntax

guess([id], model)

Description

The guess command estimates initial parameter values and the minimum and maximum range values based on the input data. For spectral fitting, guess on a model component should be done with an appropriate response defined.

  • id - the id of the dataset; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")
  • model - initialize the values of this model component

Example 1

sherpa> set_model("src", powlaw1d.p1)
sherpa> guess("src", p1)

Set a model for the dataset "src", then guess the initial parameter values of p1.

sherpa> set_model("src", powlaw1d.p1)
sherpa> show_source("src")
Model: src
powlaw1d.p1
   Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   p1.gamma     thawed            1          -10           10
   p1.ref       frozen            1 -3.40282e+38  3.40282e+38
   p1.ampl      thawed            1            0  3.40282e+38

sherpa> guess("src", p1)
sherpa> show_source("src")
Model: src
powlaw1d.p1
   Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   p1.gamma     thawed            1          -10           10
   p1.ref       frozen            1 -3.40282e+38  3.40282e+38
   p1.ampl      thawed  0.000150152  1.50152e-06    0.0150152

Example 2

sherpa> set_model(powlaw1d.p1*gauss1d.g1)
sherpa> guess(p1)
sherpa> guess(g1)

Establish a model for the default dataset, then run guess on each component separately.

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.