Last modified: 7 November 2025

Accessing the data from the error plot commands [New]


As with the plot and contour commands, the data used for the displays created by the error routines, like int_proj and reg_proj, can also be retrieved.

Error analysis:
Error command Data access
int_proj get_int_proj
reg_proj get_reg_proj
int_unc get_int_unc
reg_unc get_reg_unc

As an example, with a PHA dataset, we can view the 1D and 2D error anayses with:

sherpa> int_proj(pl.gamma)

Figure 1: 1D error analysis

[The interval-projection data is an inverted hill, with the minimum value being close to 1.78 (marked by an orange dashed line for the position and a green dashed line for the statistic value). For this analysis the search surface near the best-fit location is well behaved, and the curve is roughly symmetric.]
[Print media version: The interval-projection data is an inverted hill, with the minimum value being close to 1.78 (marked by an orange dashed line for the position and a green dashed line for the statistic value). For this analysis the search surface near the best-fit location is well behaved, and the curve is roughly symmetric.]

Figure 1: 1D error analysis

sherpa> reg_proj(pl.gamma, gal.nh)

Figure 2: 2D error analysis

[The region-projection data is a rotated ellipse, with a center about 1.78, 0.012, and there are three contours (for 1, 2, and 3 sigma).]
[Print media version: The region-projection data is a rotated ellipse, with a center about 1.78, 0.012, and there are three contours (for 1, 2, and 3 sigma).]

Figure 2: 2D error analysis

The data for these visualizations can be retrieved and displayed:

sherpa> idata = get_int_proj()
sherpa> print(idata)
x      = [1.7366,1.7414,1.7462,1.7511,1.7559,1.7607,1.7656,1.7704,1.7752,1.7801,
 1.7849,1.7897,1.7945,1.7994,1.8042,1.809 ,1.8139,1.8187,1.8235,1.8284]
y      = [101.3065,101.0966,100.911 ,100.7495,100.6118,100.4978,100.407 ,100.3393,
 100.2945,100.2721,100.2721,100.2941,100.3379,100.4032,100.4897,100.5973,
 100.7256,100.8743,101.0433,101.2322]
min    = 1.7365802718732941
max    = 1.8283567858883614
nloop  = 20
delv   = None
fac    = 1
log    = False
parval = 1.7824685288808277
sherpa> rdata = get_reg_proj()
sherpa> print(rdata)
x0      = [1.5989,1.6397,1.6805,1.7213,1.7621,1.8029,1.8437,1.8844,1.9252,1.966 ,
 1.5989,1.6397,1.6805,1.7213,1.7621,1.8029,1.8437,1.8844,1.9252,1.966 ,
 1.5989,1.6397,1.6805,1.7213,1.7621,1.8029,1.8437,1.8844,1.9252,1.966 ,
 1.5989,1.6397,1.6805,1.7213,1.7621,1.8029,1.8437,1.8844,1.9252,1.966 ,
 1.5989,1.6397,1.6805,1.7213,1.7621,1.8029,1.8437,1.8844,1.9252,1.966 ,
 1.5989,1.6397,1.6805,1.7213,1.7621,1.8029,1.8437,1.8844,1.9252,1.966 ,
 1.5989,1.6397,1.6805,1.7213,1.7621,1.8029,1.8437,1.8844,1.9252,1.966 ,
 1.5989,1.6397,1.6805,1.7213,1.7621,1.8029,1.8437,1.8844,1.9252,1.966 ,
 1.5989,1.6397,1.6805,1.7213,1.7621,1.8029,1.8437,1.8844,1.9252,1.966 ,
 1.5989,1.6397,1.6805,1.7213,1.7621,1.8029,1.8437,1.8844,1.9252,1.966 ]
x1      = [0.    ,0.    ,0.    ,0.    ,0.    ,0.    ,0.    ,0.    ,0.    ,0.    ,
 0.0044,0.0044,0.0044,0.0044,0.0044,0.0044,0.0044,0.0044,0.0044,0.0044,
 0.0088,0.0088,0.0088,0.0088,0.0088,0.0088,0.0088,0.0088,0.0088,0.0088,
 0.0131,0.0131,0.0131,0.0131,0.0131,0.0131,0.0131,0.0131,0.0131,0.0131,
 0.0175,0.0175,0.0175,0.0175,0.0175,0.0175,0.0175,0.0175,0.0175,0.0175,
 0.0219,0.0219,0.0219,0.0219,0.0219,0.0219,0.0219,0.0219,0.0219,0.0219,
 0.0263,0.0263,0.0263,0.0263,0.0263,0.0263,0.0263,0.0263,0.0263,0.0263,
 0.0307,0.0307,0.0307,0.0307,0.0307,0.0307,0.0307,0.0307,0.0307,0.0307,
 0.0351,0.0351,0.0351,0.0351,0.0351,0.0351,0.0351,0.0351,0.0351,0.0351,
 0.0394,0.0394,0.0394,0.0394,0.0394,0.0394,0.0394,0.0394,0.0394,0.0394]
y       = [120.4008,111.1954,105.9672,104.6679,107.2309,113.5727,123.5955,137.1891,
 154.2326,174.5966,124.2947,113.1681,105.8671,102.3463,102.5419,106.3749,
 113.7521,124.5691,138.7115,156.057 ,129.7901,117.002 ,107.9083,102.4659,
 100.6141,102.2773,107.3664,115.7815,127.4135,142.1456,136.5014,122.2577,
 111.5935,104.468 ,100.8234,100.5874,103.6746,109.989 ,119.4257,131.8729,
 144.1443,128.6101,116.5533,107.9356,102.7023,100.784 ,102.099 ,106.5548,
 114.0505,124.4784,152.5089,135.8178,122.5124,112.5571,105.8999,102.4747,
 102.2031,104.9961,110.7565,119.3804,161.4389,143.701 ,129.2652,118.0987,
 110.1525,105.3636,103.6567,104.9465,109.1391,116.1344,170.8176,152.1246,
 136.6568,124.3843,115.2607,109.2264,106.2092,106.1271,108.8898,114.4004,
 180.5566,160.9863,144.5699,131.2797,121.0728,113.8921,109.669 ,108.3246,
 109.772 ,113.9176,190.5884,170.2079,152.9141,138.6822,127.4719,119.2292,
 113.8887,111.3747,111.6034,114.4846]
min     = [1.5989155 0.       ]
max     = [1.96602156 0.03943551]
nloop   = (10, 10)
fac     = 4
delv    = None
log     = (False, False)
sigma   = (1, 2, 3)
parval0 = 1.7824685288808277
parval1 = 0.012577007195034283
levels  = [102.56510032 106.44942569 112.09850947]