show_method

sherpa.ui.show_method(outfile=None, clobber=False)

Display the current optimization method and options.

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

get_method()
Return an optimization method.
get_method_opt()
Return one or all options of the current optimization 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_method('levmar')
>>> show_method()
Optimization Method: LevMar
name    = levmar
ftol    = 1.19209289551e-07
xtol    = 1.19209289551e-07
gtol    = 1.19209289551e-07
maxfev  = x
epsfcn  = 1.19209289551e-07
factor  = 100.0
verbose = 0