get_stat
- sherpa.ui.get_stat(name: str | None = None) Stat
Return the fit statisic.
- Parameters:
name (str, optional) – If not given, the current fit statistic is returned, otherwise it should be one of the names returned by the
list_statsfunction.- Returns:
stat – An object representing the fit statistic.
- Return type:
- Raises:
sherpa.utils.err.ArgumentErr – If the
nameargument is not recognized.
See also
get_stat_nameReturn the name of the current fit statistic.
list_statsList the fit statistics.
set_statChange the fit statistic.
Examples
Return the currently-selected statistic, display its name, and read the help documentation for it:
>>> stat = get_stat() >>> stat.name 'chi2gehrels' >>> help(stat)
Read the help for the “wstat” statistic:
>>> help(get_stat('wstat'))