Nested models define the function argument on which a model expression
is evaluated to be another model expression. A nested model,
<nested_model>, appears as an element of a model
expression, <modelExpr>.
<sherpa_modelname>{<model_stackname>}
<sherpa_modelname>[<modelname>]{<model_stackname>}
<modelname>{<model_stackname>}
where <model_stackname> must be enclosed in curly braces, { }, and
where the model stack defines the model expression for the function
argument.
Create a nested model that defines one model component as the argument
for another:
sherpa> ERASE ALL
sherpa> oscillation = SIN
sherpa> SRC = SHLOGE{oscillation}
The user first assigns a model stackname to the Sherpa default model
SIN. The final command
establishes the nested model, SHLOGE, and assigns it to the
source model for dataset number 1. This nested model
defines the function argument SIN, over which the model
component SHLOGE is to be evaluated. Note that the
following syntax is not allowed: SRC = SHLOGE{SIN}.
Create two layers of nested models:
sherpa> stackA = POLY
sherpa> stackB = GAUSS{stackA}
sherpa> SIN[modeli]
sherpa> SOURCE = modeli{stackB}
The command stackA = POLY creates the first model stack.
The next command creates a second model stack, using the nested model construction,
GAUSS{stackA}, where the function argument on which the
model component GAUSS is
evaluated is the first model stack. Finally, the source model
expression is defined as the nested model modeli{stackB}
(i.e., modeli evaluated upon the second model
stack).
- 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,
noise,
paramprompt,
paramset,
pileup,
rename,
run_fit,
set_par,
set_paramset,
set_stackexpr,
source,
thaw,
truncate,
unlink
|