show_stat

sherpa.astro.ui.show_stat(outfile=None, clobber=False)

Display the current fit statistic.

Parameters:
  • outfile (str, optional) – If not given the results are displayed to the screen, otherwise it is taken to be the name of the file to write the results to.
  • clobber (bool, optional) – If outfile is not None, then this flag controls whether an existing file can be overwritten (True) or if it raises an exception (False, the default setting).
Raises:

sherpa.utils.err.IOErr – If outfile already exists and clobber is False.

See also

calc_stat()
Calculate the fit statistic for a data set.
calc_stat_info()
Display the statistic values for the current models.
get_stat()
Return a fit-statistic method.
show_all()
Report the current state of the Sherpa session.

Notes

When outfile is None, the text is displayed via an external program to support paging of the information. The program used is determined by the PAGER environment variable. If PAGER is not found then ‘/usr/bin/more’ is used.

Examples

>>> set_stat('cash')
>>> show_stat()
Statistic: Cash
Maximum likelihood function