Jump to: · Examples · Notes · Bugs

AHELP for CIAO 4.13 Sherpa v1

# get_confidence_results

Context: confidence

## Synopsis

Return the results of the last conf run.

## Syntax

```get_confidence_results()

Alias: get_conf_results```

## Examples

### Example 1

```>>> res = get_conf_results()
>>> print(res)
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 2

The following converts the above into a dictionary where the keys are the parameter names and the values are the tuple (best-fit value, lower-limit, upper-limit):

```>>> pvals1 = zip(res.parvals, res.parmins, res.parmaxes)
>>> pvals2 = [(v, v+l, v+h) for (v, l, h) in pvals1]
>>> dres = dict(zip(res.parnames, pvals2))
>>> dres['p1.gamma']
(2.1585155113403327, 2.07572994399221, 2.241926145484433)```

The fields of the object include:

Item Definition
datasets A tuple of the data sets used in the analysis.
methodname This will be 'confidence'.
iterfitname The name of the iterated-fit method used, if any.
fitname The name of the optimization method used.
statname The name of the fit statistic used.
sigma The sigma value used to calculate the confidence intervals.
percent The percentage of the signal contained within the confidence intervals (calculated from the sigma value assuming a normal distribution).
parnames A tuple of the parameter names included in the analysis.
parvals A tuple of the best-fit parameter values, in the same order as parnames .
parmins A tuple of the lower error bounds, in the same order as parnames .
parmaxes A tuple of the upper error bounds, in the same order as parnames .
nfits The number of model evaluations.

## Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.
{"ft_lang_label":"__label__en","ft_lang_prob":0.50568414,"math_prob":0.84613174,"size":1966,"snap":"2021-21-2021-25","text_gpt3_token_len":559,"char_repetition_ratio":0.13149847,"word_repetition_ratio":0.046263345,"special_character_ratio":0.33418107,"punctuation_ratio":0.16,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.989273,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-06-20T15:47:15Z\",\"WARC-Record-ID\":\"<urn:uuid:fe16207d-5d54-4adf-a617-dd78176d0d08>\",\"Content-Length\":\"110838\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:cc17beb8-890f-4aea-8c7f-857647edb0ef>\",\"WARC-Concurrent-To\":\"<urn:uuid:f12322ca-08c0-4c7b-a8b7-a4059489eb8a>\",\"WARC-IP-Address\":\"131.142.198.51\",\"WARC-Target-URI\":\"https://cxc.cfa.harvard.edu/sherpa/ahelp/get_confidence_results.html\",\"WARC-Payload-Digest\":\"sha1:3ZKFHHKODKR6UA2OPQMMSYJZYJ2L46EB\",\"WARC-Block-Digest\":\"sha1:3RRZGZPLIZ3DDSE5QUW3PX6KU5Q4P7X5\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-25/CC-MAIN-2021-25_segments_1623488249738.50_warc_CC-MAIN-20210620144819-20210620174819-00439.warc.gz\"}"}