    Calculate the fit statistic for a background data set.

calc_bkg_stat(id=None, *otherids)
id - int or str, optional
*otherids - int or str, optional

Evaluate the current background models for the background datasets, calculate the statistic for each background, and return the sum. No fitting is done, as the current model parameter, and any filters, are used. The `calc_bkg_stat_info`

routine should be used if the result for a particular background component needs to be returned.

Calculate the statistic for the background in the default data set:

>>> stat = calc_bkg_stat()

Find the statistic for the background for data set 3:

>>> stat = calc_bkg_stat(3)

Calculate the background statistic value using two different statistics:

>>> set_stat('chi2datavar') >>> s1 = calc_bkg_stat() >>> set_stat('chi2gehrels') >>> s2 = calc_bkg_stat()

PARAMETERS

The parameters for this function are:

Parameter
Definition
id
The data set that provides the data. If not given then all background data sets with an associated background model are used simultaneously.
*otherids
Other data sets to use in the calculation.

The return value from this function is:

stat -- The current statistic value.

Changes in CIAO

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

December 2023