Prohibits model parameter(s) from varying.
sherpa> FREEZE <arg_1> [<arg_2> ...]
<arg> may be:
FREEZE Command Arguments
<sherpa_modelname>.{<paramname> | <#>} |
Freezes the specified model component parameter. |
<modelname>.{<paramname> | <#>} |
Freezes the specified model component parameter. |
<sherpa_modelname> |
Freezes all parameters of the specified model component. |
<modelname> |
Freezes all parameters of the specified model component. |
<sherpa_model_stack> [# [ID]] |
Freezes 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> |
Freezes the parameters of all model components within the
user-defined model stack. |
The command THAW
is used to allow model parameter values to vary.
In addition, model parameters may be frozen using the equivalent command
-
sherpa> <modelname>.{<paramname>|<#>}.TYPE = FREEZE
If model parameter prompting is enabled,
the user may freeze a parameter by
entering [<value>:<min>:<max>],-1
at the prompt; the -1 sets the parameter to be frozen.
Model parameters may also be frozen using the
Sherpa/S-Lang module functions
set_frozen and
set_par.
Freeze a model parameter:
sherpa> PARAMPROMPT OFF
sherpa> GAUSS[modelb]
sherpa> FREEZE modelb.ampl
The last command freezes the parameter ampl of modelb.
Thaw a model parameter and freeze a model parameter:
sherpa> THAW modelb.3
sherpa> FREEZE modelb.3
The first command thaws the third parameter of modelb.
The last command freezes the third parameter of modelb.
Thaw all model parameters and freeze two model parameters:
sherpa> THAW modelb
sherpa> FREEZE modelb.fwhm modelb.pos
First, all parameters of modelb are thawed.
The last command then freezes 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.
Freeze a model parameter:
sherpa> modelb.ampl.TYPE = FREEZE
This command freezes the parameter ampl of modelb.
The following commands are each equivalent:
sherpa> modelb.3.TYPE = FREEZE
sherpa> FREEZE modelb.ampl
sherpa> FREEZE modelb.3
Freeze model parameters:
sherpa> ERASE ALL
sherpa> PARAMPROMPT ON
Model parameter prompting is on
sherpa> GAUSS[modelb]
modelb.fwhm parameter value [10] 2,-1
modelb.pos parameter value [0] ,-1
modelb.ampl parameter value [1]
sherpa> SHOW modelb
gauss1d[modelb]
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
In this example, parameters are frozen by entering
<value>, -1 at the model parameter value prompt.
Note that , -1 at the model parameter value prompt
accepts the given initial parameter value and freezes that parameter.
Freeze all model parameters at once; 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,
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
|