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:
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.
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.
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
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.
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.
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.
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
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.
- sherpa
-
autoest,
background,
create,
create_model,
createparamset,
fit,
freeze,
get_defined_models,
get_model_params,
get_models,
get_num_par,
get_par,
get_stackexpr,
getx,
gety,
guess,
instrument,
integrate,
is_paramset,
jointmode,
kernel,
lineid,
linkparam,
mdl,
modelexpr,
modelstack,
nestedmodel,
noise,
paramprompt,
pileup,
rename,
run_fit,
set_par,
set_paramset,
set_stackexpr,
source,
thaw,
truncate,
unlink
|