| AHELP for CIAO 4.4 Sherpa v2 | get_conf |
Context: confidence |
Synopsis
Return information regarding the confidence method.
Syntax
get_conf() get_conf_results() get_conf_opt( [name] )
Description
get_conf
The get_conf command returns the list of current settings defining the confidence estimation method (see "ahelp conf"); these settings may be modified by the user. This function accepts no arguments. The returned information is:
- eps - precision of resulting limits, default=0.01
- fast - if 'True', the fit optimization method is switched to a faster option to reduce the time per fit; default=False, so that the current optimization method is used
- max_rstat - maximum possible value of the reduced statistic, default=3
- maxfits - maximum number of tries to fit the parameter space, default=5
- maxiters- maximum number of tries to bracket desired limits, before returning, default=200
- openinterval - how the confidence function should behave when it cannot locate the root within the open interval; see "ahelp conf" for a detailed explanation; default=False
- parallel - switch which allows confidence to be run as a parallel process; default=True
- numcores - number of cores to use when conf command is run in parallel
- remin - if during search, a new fit statistic is found that is smaller than original best fit, the difference between new and original statistics must be greater than this value, default=0.01
- sigma - to get 1, 2, or 3-sigma limits, default=1
- soft_limits - a switch which allows the search to go all the way out to the hard parameter limits; if switched on, the search will be restricted to occur within the soft limits, which can be changed by the user, default=False
- tol - tolerance for the fit, default=0.20000000000000001
- verbose - print information to the screen?; default=False
get_conf_results
The get_conf_results command accesses results from the last run of the confidence command. The function accepts no arguments. The results include the following attributes:
- datasets - Data sets in fit
- methodname - Estimation method name
- iterfitname - Iterative fitting method name, if one specified
- fitname - Fitting method name
- statname - Statistic name
- sigma - Change in statistic
- percent - % confidence interval corresponding to sigma
- parnames - Model parameter names
- parvals - Model parameter fit values
- parmins - Model parameter minimum values
- parmaxes - Model parameter maximum values
- warnings - Warning messages
get_conf_opt
The get_conf_opt command returns the value of a confidence option by name. If the name isn't specified, it returns a dictionary of all options that govern how confidence is run.
- eps - precision of resulting limits, default=0.01
- fast - if 'True', the fit optimization method is switched to a faster option to reduce the time per fit; default=False, so that the current optimization method is used
- max_rstat - maximum possible value of the reduced statistic, default=3
- maxfits - maximum number of tries to fit the parameter space, default=5
- maxiters- maximum number of tries to bracket desired limits, before returning, default=200
- openinterval - how the confidence function should behave when it cannot locate the root within the open interval; see "ahelp conf" for a detailed explanation; default=False
- parallel - switch which allows confidence to be run as a parallel process; default=True
- numcores - number of cores to use when conf command is run in parallel
- remin - if during search, a new fit statistic is found that is smaller than original best fit, the difference between new and original statistics must be greater than this value, default=0.01
- sigma - to get 1, 2, or 3-sigma limits, default=1
- soft_limits - a switch which allows the search to go all the way out to the hard parameter limits; if switched on, the search will be restricted to occur within the soft limits, which can be changed by the user, default=False
- tol - tolerance for the fit, default=0.20000000000000001
- verbose - print information to the screen?; default=False
Example 1
sherpa> get_conf()
Return a variable listing all of the settings that govern how the confidence method calculates confidence limits. Sample output is:
sherpa> print(get_conf())
name = confidence
verbose = False
openinterval = False
max_rstat = 3
maxiters = 200
soft_limits = False
eps = 0.01
fast = False
maxfits = 5
remin = 0.01
tol = 0.2
sigma = 1
parallel = True
numcores = 2
sherpa> set_conf_opt("maxiters",300)
sherpa> print(get_conf())
name = confidence
verbose = False
openinterval = False
max_rstat = 3
maxiters = 300
soft_limits = False
eps = 0.01
fast = False
maxfits = 5
remin = 0.01
tol = 0.2
sigma = 1
parallel = True
numcores = 2
Example 2
sherpa> get_conf_results()
Return a variable listing all of the results from the last run of the confidence command. Sample output is:
sherpa-> print(get_conf_results())
datasets = (1,)
methodname = confidence
iterfitname = none
fitname = levmar
statname = chi2gehrels
sigma = 1
percent = 68.2689492137
parnames = ('p1.gamma', 'p1.ampl')
parvals = (2.1585155113403327, 0.00022484014787994827)
parmins = (-0.082785567348122591, -1.4825550342799376e-05)
parmaxes = (0.083410634144100104, 1.4825550342799376e-05)
nfits = 13
Example 3
sherpa> get_conf_opt()
sherpa> get_conf_opt("sigma")
1When called without a specific option name, the get_conf_opt command returns the dictionary of all options that govern how confidence is run. If an option name such as "sigma" is specified, it returns the value of the sigma option, which is "1" in this example. Sample output of get_conf_opt() is:
sherpa> print(get_conf_opt())
{'verbose': False, 'openinterval': False, 'max_rstat': 3, 'maxiters': 200, 'soft_limits': False, 'eps': 0.01, 'fast': False, 'maxfits': 5, 'remin': 0.01, 'tol': 0.20000000000000001, 'sigma': 1, ''numcores': 2, parallel': True}
Bugs
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.
See Also
- confidence
- conf, covariance, get_covar, get_int_proj, get_int_unc, get_proj, get_reg_proj, get_reg_unc, int_proj, int_unc, projection, reg_proj, reg_unc, set_conf_opt, set_covar_opt, set_proj_opt
- contrib
- get_chart_spectrum
- data
- get_areascal, get_arf, get_arf_plot, get_axes, get_backscal, get_bkg, get_bkg_plot, get_bkg_scale, get_coord, get_counts, get_data, get_data_plot, get_dep, get_dims, get_error, get_exposure, get_grouping, get_indep, get_quality, get_rmf, get_specresp, get_staterror, get_syserror
- filtering
- get_filter
- fitting
- calc_stat_info, get_fit, get_stat_info
- info
- get_default_id, list_stats
- methods
- get_draws, get_iter_method_name, get_iter_method_opt, get_method
- modeling
- get_model, get_model_component, get_model_component_image, get_model_component_plot, get_model_plot, get_num_par, get_order_plot, get_par, get_pileup_model, get_response, get_source, get_source_component_image, get_source_component_plot, image_source
- plotting
- get_split_plot
- psfs
- get_kernel, get_psf
- statistics
- get_chisqr_plot, get_delchi_plot, get_prior, get_sampler, get_stat
- utilities
- get_analysis, get_rate
- visualization
- get_ratio, get_resid, image_getregion

![[Sherpa Logo]](../imgs/sherpa_logo_navbar.gif)