get_int_proj
- sherpa.astro.ui.get_int_proj(par=None, id=None, otherids=None, recalc=False, fast=True, min=None, max=None, nloop=20, delv=None, fac=1, log=False, numcores=None)
Return the interval-projection object.
This returns (and optionally calculates) the data used to display the
int_proj
plot. Note that if the therecalc
parameter isFalse
(the default value) then all other parameters are ignored and the results of the lastint_proj
call are returned.- Parameters:
par – The parameter to plot. This argument is only used if
recalc
is set toTrue
.id (str or int, optional) – The data set that provides the data. If not given then all data sets with an associated model are used simultaneously.
otherids (list of str or int, optional) – Other data sets to use in the calculation.
recalc (bool, optional) – The default value (
False
) means that the results from the last call toint_proj
(orget_int_proj
) are returned, ignoring all other parameter values. Otherwise, the statistic curve is re-calculated, but not plotted.fast (bool, optional) – If
True
then the fit optimization used may be changed from the current setting (only for the error analysis) to use a faster optimization method. The default isFalse
.min (number, optional) – The minimum parameter value for the calculation. The default value of
None
means that the limit is calculated from the covariance, using thefac
value.max (number, optional) – The maximum parameter value for the calculation. The default value of
None
means that the limit is calculated from the covariance, using thefac
value.nloop (int, optional) – The number of steps to use. This is used when
delv
is set toNone
.delv (number, optional) – The step size for the parameter. Setting this over-rides the
nloop
parameter. The default isNone
.fac (number, optional) – When
min
ormax
is not given, multiply the covariance of the parameter by this value to calculate the limit (which is then added or subtracted to the parameter value, as required).log (bool, optional) – Should the step size be logarithmically spaced? The default (
False
) is to use a linear grid.numcores (optional) – The number of CPU cores to use. The default is to use all the cores on the machine.
- Returns:
iproj – The fields of this object can be used to re-create the plot created by
int_proj
.- Return type:
a
sherpa.plot.IntervalProjection
instance
See also
conf
Estimate parameter confidence intervals using the confidence method.
covar
Estimate the confidence intervals using the covariance method.
int_proj
Calculate and plot the fit statistic versus fit parameter value.
int_unc
Calculate and plot the fit statistic versus fit parameter value.
reg_proj
Plot the statistic value as two parameters are varied.
Examples
Return the results of the
int_proj
run:>>> int_proj(src.xpos) >>> iproj = get_int_proj() >>> min(iproj.y) 119.55942437129544
Since the
recalc
parameter has not been changed toTrue
, the following will return the results for the last call toint_proj
, which may not have been for the src.ypos parameter:>>> iproj = get_int_proj(src.ypos)
Create the data without creating a plot:
>>> iproj = get_int_proj(pl.gamma, recalc=True)
Specify the range and step size for the parameter, in this case varying linearly between 12 and 14 with 51 values:
>>> iproj = get_int_proj(src.r0, id="src", min=12, max=14, ... nloop=51, recalc=True)