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

Synopsis

The model components that have been established in the current Sherpa session, and their parameter information, may be listed with the command SHOW MODELS. Values for these established model component parameters may be set individually using one of the following command syntax options:

Syntax

sherpa> [CREATE] <modelname>.{<paramname> | <#>} {= <value> | =>
<paramExpr>}
sherpa> [CREATE] <modelname>.{<paramname> | <#>}.VALUE = <value>

where <modelname> is a name given to a model component by the user,
<paramname> specifies the parameter whose value is to be set, <value>
is the numerical value to which the parameter should be set, and =>
<paramExpr> is the syntax used for linking parameters.

Note that either <paramname> or <#> may specify the parameter whose
value is to be set.

Description

Parameter values may also be set interactively from a plot. Please see the GETX command for information on interactively assigning an x-axis value from a plot to a model parameter; see the GETY command for information on interactively assigning a y-axis value.

In addition, the minimum, maximum, and initial delta for parameters may also be individually set, using one of the following command syntax options:

sherpa> [CREATE] <modelname>.{<paramname> | <#>}.MIN = <value>
sherpa> [CREATE] <modelname>.{<paramname> | <#>}.MAX = <value>
sherpa> [CREATE] <modelname>.{<paramname> | <#>}.DELTA = <value>

Alternatively, model parameters and ranges may all be set at one time, using a single command:

sherpa> [CREATE] <modelname>.{<paramname> | <#>} = <param>

The command argument <param> contains the parameter assignments <value>:<min>:<max>:<delta>, where <value> is the value for the model parameter, <min> is the minimum value for the parameter, <max> is the maximum value for the parameter, and <delta> specifies the initial parameter step size.

Example 1

Establish a model component, and assign it a name; set a model parameter value:

sherpa> ERASE ALL
sherpa> PARAMPROMPT OFF
Model parameter prompting is off
sherpa> POLY[modela]
sherpa> modela.c0 = 3.0

The command modela.c0 = 3.0 gives the value of 3.0 to parameter c0 of modela. Note that modela is the name given by the user to the Sherpa model component POLY. The following commands are each equivalent to the final command:

sherpa> modela.c0.VALUE = 3.0
sherpa> modela.1 = 3.0
sherpa> modela.1.VALUE = 3.0

Example 2

Establish a model component, and assign it a name; set a model parameter value, and the parameter range limits:

sherpa> POW[modelc]
sherpa> modelc.3 = 10.0
sherpa> modelc.3.MIN = 1.0
sherpa> modelc.3.MAX = 100.0

The second command, modelc.3 = 10.0, gives the value of 10.0 to parameter number 3 of modelc. The third and fourth commands set the minimum and maximum values for parameter number 3 of this model component.

Example 3

Set initial model parameter step size delta:

sherpa> modelc.3.DELTA = 0.05

This command sets the parameter's initial step size, delta, to a value of 0.05.

Example 4

Establish two different model components, and assign them names; link one model parameter to another:

sherpa> ERASE ALL
sherpa> POLY[modela]
sherpa> GAUSS[modelb]
sherpa> modelb.ampl => 0.5*modela.c0

The last command in this series uses a model parameter expression to link the ampl parameter of modelb to 0.5 multiplied by the c0 parameter of modela.

Example 5

Establish a model component, and assign it a name; set a model parameter value, and the parameter range limits:

sherpa> POW[modelc]
sherpa> modelc.3 = 10.0:1.0:100.0

The command modelc.3 = 10.0:1.0:100.0 gives the value of 10.0 to parameter number 3, sets the minimum to 1.0 for this parameter, and sets the maximum to 100.0 for this parameter, of modelc (where modelc is the name given by the user to the Sherpa model component POW, with the second command). The following command is equivalent to the third command:

sherpa> modelc.ampl = 10.0:1.0:100.0

Example 6

Set a model parameter value, the parameter range limits, and set the initial parameter step size delta:

sherpa> modelc.3 = 10.0:1.0:100.0:0.05

This command gives the value of 10.0 to modelc parameter number 3, sets the minimum to 1.0 for this parameter, sets the maximum to 100.0 for this parameter, and sets the parameter's initial step size, delta, to a value of 0.05.

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.