Module function to fit datasets, and retrieve information about the final fit.
Struct_Type run_fit([{Integer_Type | Array_Type}])
Arguments:
(1) Dataset number or array of dataset numbers (default all datasets)
This function initiates a Sherpa fit. When complete, it
calls
get_goodness, and a structure or an array of
structures is returned. A single structure is returned if only one
data set is fit, and an array of N+1 structures is returned if N data
sets are fit simultaneously. For the latter case, the summed
statistics for the combined fit are returned in the 0th element of the
structure array.
See the related Sherpa commands
FIT and
GOODNESS for more information.
Load two datasets; fit the second and examine the results:
sherpa> DATA 1 example.pha
The inferred file type is PHA. If this is not what you want, please
specify the type explicitly in the data command.
WARNING: using systematic errors specified in the PHA file.
RMF is being input from:
<directory_path>/example2.rmf
ARF is being input from:
<directory_path>/example2.arf
Background data are being input from:
<directory_path>/example2_bkg.pha
sherpa> DATA 2 spec.dat
sherpa> () = set_source_expr(2,"CONST[cs]")
sherpa> result = run_fit(2)
LVMQT: V2.0
LVMQT: initial statistic value = 82.2297
LVMQT: final statistic value = 63.9111 at iteration 3
cs.c0 57.7977
sherpa> print(result)
dataset = 2
datatype = source
stat = 63.9111
numbins = 100
dof = 99
rstat = 0.645567
qval = 0.997605
- 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,
set_par,
set_paramset,
set_stackexpr,
source,
thaw,
truncate,
unlink
|