get_syserror
- sherpa.astro.ui.get_syserror(id: IdType | None = None, filter=False, bkg_id: IdType | None = None)
Return the systematic error on the dependent axis of a data set.
The function returns the systematic errors on the values (dependenent axis) of a data set, or its background. It is an error if called on a data set with no systematic errors (which are set with
set_syserror).- Parameters:
- id
int,str,orNone,optional The identifier for the data set to use. If not given then the default identifier is used, as returned by
get_default_id.- filterbool,
optional Should the filter attached to the data set be applied to the return value or not. The default is
False.- bkg_id
int,str,orNone,optional Set if the values returned should be from the given background component, instead of the source data set.
- id
- Returns:
- Raises:
sherpa.utils.err.DataErrIf the data set has no systematic errors.
sherpa.utils.err.IdentifierErrIf the data set does not exist.
See also
get_errorReturn the errors on the dependent axis of a data set.
get_indepReturn the independent axis of a data set.
get_staterrorReturn the statistical errors on the dependent axis of a data set.
list_data_idsList the identifiers for the loaded data sets.
set_syserrorSet the systematic errors on the dependent axis of a data set.
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
filterargument toTrueto apply this filter.Examples
Return the systematic error for the default data set:
>>> yerr = get_syserror()
Return an array that has been filtered to match the data:
>>> yerr = get_syserror(filter=True)
Return the filtered errors for data set “core”:
>>> yerr = get_syserror("core", filter=True)