About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/freeze.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 freeze Context: sherpa

Synopsis

Prohibits model parameter(s) from varying.

Syntax

sherpa> FREEZE <arg_1> [<arg_2> ...]

Description

<arg> may be:

FREEZE Command Arguments

Argument Description
<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.

Example 1

Freeze a model parameter:

sherpa> PARAMPROMPT OFF
sherpa> GAUSS[modelb]
sherpa> FREEZE modelb.ampl

The last command freezes the parameter ampl of modelb.

Example 2

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.

Example 3

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.

Example 4

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.

Example 5

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

Example 6

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.

Example 7

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.

Bugs

See the Sherpa bug pages online for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.