Estimate initial parameter values and ranges
The guess command estimates initial parameter values and the
minimum and maximum range values based on the input data.
For spectral fitting, guess on a model component should be done
with an appropriate response defined.
-
id - the id of the dataset; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")
-
model - initialize the values of this model component
sherpa> set_model("src", powlaw1d.p1)
sherpa> guess("src", p1)
Set a model for the dataset "src", then guess the initial
parameter values of p1.
sherpa> set_model("src", powlaw1d.p1)
sherpa> show_source("src")
Model: src
powlaw1d.p1
Param Type Value Min Max Units
----- ---- ----- --- --- -----
p1.gamma thawed 1 -10 10
p1.ref frozen 1 -3.40282e+38 3.40282e+38
p1.ampl thawed 1 0 3.40282e+38
sherpa> guess("src", p1)
sherpa> show_source("src")
Model: src
powlaw1d.p1
Param Type Value Min Max Units
----- ---- ----- --- --- -----
p1.gamma thawed 1 -10 10
p1.ref frozen 1 -3.40282e+38 3.40282e+38
p1.ampl thawed 0.000150152 1.50152e-06 0.0150152
sherpa> set_model(powlaw1d.p1*gauss1d.g1)
sherpa> guess(p1)
sherpa> guess(g1)
Establish a model for the default dataset, then run guess on each
component separately.
|