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

Synopsis

Parameter expressions are used to link model component parameters:

Syntax

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

where <modelname> is the name that has been given to a model component
by the user. Note that either <paramname> or <#> may specify a
parameter.

Description

The parameter expression, <paramExpr>, to which the parameter is being linked, may be composed of one, or more (combined algebraicly), of the following elements:

Element Description:
<modelname>.{<paramname> | <#>} A model component parameter.
<model_stackname> A model expression, specified via a model stack name.

A parameter expression may be an algebraic combination of these elements that may include numerical values and the following operators: + - * / ( ) < > { }.

The command UNLINK may be used to remove a link between model parameters:

sherpa> UNLINK <modelname>.{<paramname> | <#>}

Example 1

Link one model parameter to another:


sherpa> ERASE ALL
sherpa> PARAMPROMPT ON
Model parameter prompting is on
sherpa> GAUSS[modelb]
modelb.fwhm parameter value [10]
modelb.pos parameter value [0]
modelb.ampl parameter value [1]
sherpa> GAUSS[modelf]
modelf.fwhm parameter value [10]
modelf.pos parameter value [0]
modelf.ampl parameter value [1]
sherpa> modelf.ampl => 0.5*modelb.ampl

The last command in this series uses a model parameter expression, to link the ampl parameter of modelf to 0.5 multiplied by the ampl parameter of modelb. That is, the amplitudes of two Gaussian models are linked, where one is half that of the other. Note that model parameter expressions cannot be created within the model parameter prompting. Note that the link may be removed as follows:


sherpa> UNLINK modelf.ampl

Example 2

Link one model parameter to another:


sherpa> PARAMPROMPT OFF
Model parameter prompting is off
sherpa> POW[modelc]
sherpa> POW[modeld]
sherpa> POW[modele]
sherpa> modelc.1 => modele.1
sherpa> modelc.3 => modeld.3 + modele.3

The next-to last command in this series links the first parameter (gamma) of modelc to the first parameter of modele. The last command in this series links the third parameter (ampl) of modelc to the sum of the third parameters of modeld and modele. Note that the links may be removed as follows:


sherpa> UNLINK modelc.1
sherpa> UNLINK modelc.3

Example 3

Link a model parameter to a model expression:


sherpa> ERASE ALL
sherpa> SIN[modeli]
sherpa> SOURCE = modeli
sherpa> PeriodVariation = POLY[modela]
sherpa> modeli.period => PeriodVariation

The first command, SIN[modeli], assigns the name modeli to the Sherpa model component SIN. The second command defines this model component as the source model to be used for fitting. The third command, PeriodVariation = POLY[modela], creates a model stack. The final command links the parameter period of modeli to the parameter expression PeriodVariation (which is composed of the model component modela). Note that the following parameter expression syntax is currently not allowed: modeli.period => POLY[modela].

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.