Module functions to retrieve the value and statistic arrays from the most recent run of a parameter estimation method
Struct_Type get_intunc()
Struct_Type get_intproj()
Error Return Value: NULL
These functions retrieve information from the most recent run of the
INTERVAL-UNCERTAINTY or
run_intunc, and
INTERVAL-PROJECTION or
run_intproj
parameter estimation methods, respectively.
Each returns a structure with five fields:
- x0: the grid of parameter values;
- y: the statistics as a function of parameter value;
- name: the name of the parameter;
- bfit: the best-fit value of the parameter; and
- config: a Struct_Type variable containing the parameters used to calculate x0 and y.
These functions can be used to retrieve information similar to that
provided by the XSPEC command steppar.
Fit a dataset; get information about chi-square
as a function of power-law amplitude p.ampl after
running INTERVAL-PROJECTION:
sherpa> DATA example.pha
sherpa> SUBTRACT
sherpa> PARAMPROMPT OFF
sherpa> SOURCE = POW[p]
sherpa> FIT
...
sherpa> INTERVAL-PROJECTION p.ampl
Interval-Projection: computing grid size with covariance...done.
outer grid loop 20% done...
outer grid loop 40% done...
outer grid loop 60% done...
outer grid loop 80% done...
[...plot displayed...]
sherpa> intproj = get_intproj()
sherpa> print(intproj)
x0 = Float_Type[20]
y = Float_Type[20]
name = p.ampl
bfit = 0.000191983
config = sherpa_VisParEst_State
sherpa> printarr(intproj.x0,3)
0.000158651
0.000162159
0.000165668
sherpa> printarr(intproj.y,3)
197.622
195.83
194.238
The second-to-last call displays the first three values of
the p.ampl grid, while the last call displays
the best-fit statistic given those p.ampl values.
The structures returned by these functions contain additional fields - name, bfit, and config - which are described above.
- sherpa
-
berrors,
bsyserrors,
compute_errors,
compute_statistic,
covariance,
errors,
ftest,
get_paramest,
get_paramestlim,
get_paramestreg,
goodness,
interval-projection,
interval-uncertainty,
list_paramest,
mlr,
projection,
region-projection,
region-uncertainty,
restore_paramest,
run_paramest,
run_paramestint,
run_paramestlim,
run_paramestreg,
set_errors,
set_syserrors,
staterrors,
syserrors,
uncertainty
|