Defines an expression to be used for modeling detector noise in source
and background datasets.
sherpa> [B]NOISE [<dataset range> | ALLSETS [ID]] = <modelExpr>
NOISE is used for modeling detector noise in source datasets, while
BENOISE is used for modeling detector noise in background datasets.
<dataset range> = # (or more generally #:#,#:#, etc.) such that #
specifies a dataset number and #:# represents an inclusive range of
datasets; one may specify multiple inclusive ranges by separating them
with commas. The default dataset is dataset 1. The ID modifier is used
only in conjunction with BNOISE, and then if and only if the Sherpa
state object variable multiback is set to 1, i.e., if more than one
background dataset is to be associated with a single source dataset.
The ID modifier may be any unreserved string (e.g., A, foo, etc.),
i.e., a string that is not a parsable command.
The model expression,
<modelExpr>,
is an algebraic combination of one or more of the following elements:
{<sherpa_modelname> | <sherpa_modelname>[modelname] |
<modelname> | <model_stack> | <nested_model>}
along with numerical values. The following operators are
recognized: + - * / ( ) { }.
See the CREATE command for further information.
Note that:
-
The documentation on
Sherpa Models contains a
summary list, and descriptions, of the models
that are available within Sherpa, which include models
from XSPEC, v. 11.3.
-
By default, if the model expression includes a model
component that has not previously been established, Sherpa
will prompt for the initial parameter values for that model component.
This prompting can be turned off using the
PARAMPROMPT OFF command.
To reset the noise model stack, issue the command:
sherpa> [B]NOISE [<dataset range> | ALLSETS] =
The NOISE model stack differs from the
SOURCE model stack in that after evaluation, the
array of noise model amplitudes is not multiplied
by the ARF (or by the exposure map in 2D analyses).
It is simply added to the ARF-multiplied source model
stack amplitudes, and the sum is subsequently folded through the
RMF. Components of the NOISE model stack are
equivalent to model components in XSPEC to which
"/b" has been appended (e.g., lorentz/b).
Define models to be used in the SOURCE and
NOISE model stacks:
sherpa> INSTRUMENT 2 = RSP[myinst]("data/source.rmf", "data/source.arf")
sherpa> SOURCE 2 = XSWABS[modela]*POWLAW1D[modelb]
sherpa> NOISE 2 = CONST[modelc]
This command defines the Sherpa model CONST (a constant) as the detector noise
model for dataset
number 2. In fits, the SOURCE model stack expression is
evaluated, and the resulting array of amplitudes is multiplied by the ARF.
Then the NOISE model stack expression is evaluated, with
the resulting array of amplitudes added to the ARF-multiplied source
array. The summed array is then folded through the RMF.
- 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,
paramprompt,
paramset,
pileup,
rename,
run_fit,
set_par,
set_paramset,
set_stackexpr,
source,
thaw,
truncate,
unlink
|