To be especially efficient, one may establish and assign a name to a
model component, as well as set model parameters and their ranges,
all at one time using a single command:
sherpa> [CREATE] <sherpa_modelname>[<modelname>](<param>
[,<param>,<param>, ...])
where <sherpa_modelname> is the Sherpa default model name and
<modelname> is the name being given to the model component by the user.
Note that <modelname> must be enclosed in brackets, [ ]. The sequential
order of the comma-separated <param> arguments indicates to which model
parameter the values will be applied. That is, the first <param>
argument will apply to the model's first parameter, the second <param>
to the model's second parameter, etc.
The command argument
<param> contains the parameter assignments
<value>:<min>:<max>:<delta>, where:
<value> | The value for the model parameter. |
<min> | The minimum for that parameter range. |
<max> | The maximum for that parameter range. |
<delta> | Specifies initial parameter step size. |
The colon separated list for <param> need not include all of the
elements, but it does need to maintain the proper sequential
parameter order.
Establish a model component, assign it a name, and set parameter values and ranges:
sherpa> ERASE ALL
sherpa> POLY[modela](3.0:1.0:4.0)
Assigns the name modela to the Sherpa model component
POLY.
Also gives the value of 3.0 to the model's first
parameter (in this case parameter c0),
sets the minimum to 1.0 for this parameter,
and sets the maximum to 4.0 for this parameter.
Establish a model component, assign it a name, and set parameter values:
sherpa> POW[modelc](1, 5, 10)
Assigns the name modelc to the Sherpa model component
POW.
Also gives the value of 1.0 to the model's first
parameter (in this case parameter gamma),
gives the value of 5.0 to the model's second
parameter (ref), and gives the value
of 10.0 to the model's third parameter (ampl).
Establish a model component,
assign it a name, and set parameter values:
sherpa> POW[modelc2](,,10.0:1.0:100.0:0.05)
Assigns the name modelc2 to the Sherpa model component
POWLAW1D.
Also gives the value of 10.0 to the model's third
parameter (in this case parameter ampl),
sets the minimum to 1.0 for this parameter,
sets the maximum to 100.0 for this parameter,
and set the initial step size to 0.05 for this parameter.
- sherpa
-
autoest,
background,
create,
create_model,
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,
paramset,
pileup,
rename,
run_fit,
set_par,
set_paramset,
set_stackexpr,
source,
thaw,
truncate,
unlink
|