    Return the errors on the dependent axis of a data set.

get_error(id=None, filter=False, bkg_id=None)
id - int or str, optional
filter - bool, optional
bkg_id - int or str, optional

The function returns the total errors (a quadrature addition of the statistical and systematic errors) on the values (dependent axis) of a data set or its background. The individual components can be retrieved with the `get_staterror` and

`get_syserror` functions.

Return the error values for the default data set, ignoring any filter applied to it:

>>> err = get_error()

Ensure that the return values are for the selected (filtered) points in the default data set (the return array may be smaller than in the previous example):

>>> err = get_error(filter=True)

Find the errors for the "core" data set and its two background components:

>>> err = get_error('core', filter=True) >>> berr1 = get_error('core', bkg_id=1, filter=True) >>> berr2 = get_error('core', bkg_id=2, filter=True)

PARAMETERS

The parameters for this function are:

Parameter
Definition
id
The identifier for the data set to use. If not given then the default identifier is used, as returned by

`get_default_id` .
filter
Should the filter attached to the data set be applied to the return value or not. The default is False .
bkg_id
Set if the values returned should be from the given background component, instead of the source data set.

The return value from this function is:

errors -- The error for each data point, formed by adding the statistical and systematic errors in quadrature. For PHA data sets, the return array will match the grouping scheme applied to the data set. The size of this array depends on the `filter` argument.

Notes

The default behavior is to not apply any filter defined on the independent axes to the results, so that the return value is for all points (or bins) in the data set. Set the `filter` argument to `True` to apply this filter.

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023