Chi2XspecVar¶
-
class
sherpa.stats.
Chi2XspecVar
(name='chi2xspecvar')[source]¶ Bases:
sherpa.stats.Chi2
Chi Squared with data variance (XSPEC style).
The variance in each bin is estimated from the data value in that bin. See also Chi2DataVar, Chi2Gehrels, and Chi2ModVar.
The calculation of the variance is the same as Chi2DataVar except that if the number of counts in a bin is less than 1 then the variance for that bin is set to 1.
Methods Summary
calc_chisqr
(data, model)Return the chi-square value for each bin. calc_stat
(data, model)calc_staterror
Methods Documentation
-
calc_chisqr
(data, model)¶ Return the chi-square value for each bin.
Parameters: - data (a Data or DataSimulFit instance) – The data set, or sets, to use.
- model (a Model or SimulFitModel instance) – The model expression, or expressions. If a SimulFitModel is given then it must match the number of data sets in the data parameter.
Returns: chisqr – The per-bin chi-square values.
Return type: array of numbers
-
calc_stat
(data, model)¶
-
calc_staterror
()¶
-