Allows model parameter(s) to vary.
sherpa> THAW <arg_1> [<arg_2> ...]
<arg> may be:
THAW Command Arguments
<sherpa_modelname>.{<paramname> | <#>} |
Thaws the specified model component parameter. |
<modelname>.{<paramname> | <#>} |
Thaws the specified model component parameter. |
<sherpa_modelname> |
Thaws all parameters of the specified model component. |
<modelname> |
Thaws all parameters of the specified model component. |
<sherpa_model_stack> [# [ID]] |
Thaws the parameters of all model components within the
specified model stack (SOURCE, BACKGROUND,
PILEUP, [B]NOISE, or
KERNEL).
# is a dataset number (default 1); see
BACKGROUND for an explanation of ID.
|
<model_stack> |
Thaws the parameters of all model components within the
user-defined model stack. |
The command FREEZE
is used to prohibit model parameter values from varying.
In addition, model parameters may be thawed using the equivalent command
-
sherpa> <modelname>.{<paramname>|<#>}.TYPE = THAW
Model parameters may also be thawed using the
Sherpa/S-Lang module functions
set_thawed and
set_par.
Thaw a model parameter:
sherpa> GAUSS[modelb]
modelb.fwhm parameter value [10]
modelb.pos parameter value [0]
modelb.ampl parameter value [1]
sherpa> THAW modelb.ampl
The final command thaws the parameter ampl of modelb.
Freeze a model parameter and thaw a model parameter:
sherpa> FREEZE modelb.3
sherpa> THAW modelb.3
First, the third parameter of modelb is frozen.
The last command then thaws the third parameter of modelb.
Freeze all model parameters and thaw two model parameters:
sherpa> FREEZE modelb
sherpa> THAW modelb.fwhm modelb.pos
First, all parameters of modelb are frozen.
The last command then thaws the fwhm and pos
parameters of modelb.
Freeze or thaw all source component parameters at once:
sherpa> PARAMPROMPT OFF
Model parameter prompting is off
sherpa> POW[modelc]
sherpa> GAUSS[modelf]
sherpa> SOURCE 2 = modelc + modelf
sherpa> FREEZE SOURCE 2
sherpa> SHOW SOURCE 2
Source 2:
(modelc + modelf)
powlaw1d[modelc] (integrate: on)
Param Type Value Min Max Units
----- ---- ----- --- --- -----
1 gamma frozen 1 -10 10
2 ref frozen 1-3.4028e+38 3.4028e+38
3 ampl frozen 1 1e-20 3.4028e+38
gauss1d[modelf] (integrate: on)
Param Type Value Min Max Units
----- ---- ----- --- --- -----
1 fwhm frozen 10 1.1755e-38 3.4028e+38
2 pos frozen 0-3.4028e+38 3.4028e+38
3 ampl frozen 1-3.4028e+38 3.4028e+38
sherpa> THAW SOURCE 2
sherpa> SHOW SOURCE 2
(modelc + modelf)
powlaw1d[modelc] (integrate: on)
Param Type Value Min Max Units
----- ---- ----- --- --- -----
1 gamma thawed 1 -10 10
2 ref frozen 1-3.4028e+38 3.4028e+38
3 ampl thawed 1 1e-20 3.4028e+38
gauss1d[modelf] (integrate: on)
Param Type Value Min Max Units
----- ---- ----- --- --- -----
1 fwhm thawed 10 1.1755e-38 3.4028e+38
2 pos thawed 0-3.4028e+38 3.4028e+38
3 ampl thawed 1-3.4028e+38 3.4028e+38
This example illustrates the use of FREEZE SOURCE
and THAW SOURCE
to freeze and thaw all source component parameters at once, respectively.
Note that thawing of some model parameters
(e.g., POWLAW1D.ref) is not permitted.
Thaw a model parameter:
sherpa> modelb.ampl.TYPE = THAW
This command thaws the parameter ampl of modelb.
The following commands are each equivalent:
sherpa> modelb.3.TYPE = THAW
sherpa> THAW modelb.ampl
sherpa> THAW modelb.3
Freeze all model parameters at once and thaw all source parameters at once:
sherpa> PARAMPROMPT OFF
Model parameter prompting is off
sherpa> DATA data/example.pha
sherpa> GAUSS[modelc]
sherpa> SOURCE = modelb + modelc
sherpa> FREEZE modelc
sherpa> SHOW SOURCE
(modelb + modelc)
gauss1d[modelb] (integrate: on)
Param Type Value Min Max Units
----- ---- ----- --- --- -----
1 fwhm frozen 2 1.1755e-38 3.4028e+38
2 pos frozen 0-3.4028e+38 3.4028e+38
3 ampl thawed 1-3.4028e+38 3.4028e+38
gauss1d[modelc] (integrate: on)
Param Type Value Min Max Units
----- ---- ----- --- --- -----
1 fwhm frozen 0.7113 0.0071 71.1283
2 pos frozen 0.9442 0.0276 14.5494
3 ampl frozen 0.0001 1.0564e-06 0.0106
sherpa> THAW SOURCE
sherpa> SHOW SOURCE
(modelb + modelc)
gauss1d[modelb] (integrate: on)
Param Type Value Min Max Units
----- ---- ----- --- --- -----
1 fwhm thawed 2 1.1755e-38 3.4028e+38
2 pos thawed 0-3.4028e+38 3.4028e+38
3 ampl thawed 1-3.4028e+38 3.4028e+38
gauss1d[modelc] (integrate: on)
Param Type Value Min Max Units
----- ---- ----- --- --- -----
1 fwhm thawed 0.7113 0.0071 71.1283
2 pos thawed 0.9442 0.0276 14.5494
3 ampl thawed 0.0001 1.0564e-06 0.0106
Note that the command FREEZE modelc
freezes all parameters of the source
model component modelc,
while THAW SOURCE thaws all parameters of both source
model components.
- 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,
paramset,
pileup,
rename,
run_fit,
set_par,
set_paramset,
set_stackexpr,
source,
truncate,
unlink
|