About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2008

URL: http://cxc.harvard.edu/sherpa4.1/set_method_opt.py.html
AHELP for Sherpa 4.1

set_method_opt

Context: py.sherpa

Synopsis

Set the options of the chosen optimization method

Syntax

set_method_opt( optname, val )

Description

The set_method_opt command sets the options for the chosen optimization method. Refer to the ahelp file for each method for a complete description of the options (e.g. "ahelp levmar").

  • optname - optimization method option name
  • val - value for the option

A list of the available options for each method is returned by the get_method_opt command ("ahelp get_method_opt"), e.g.

sherpa> get_method_name()
levmar

sherpa> get_method_opt()
{'epsfcn': 1.1920928955078125e-07,
 'factor': 100.0,
 'ftol': 1.1920928955078125e-07,
 'gtol': 1.1920928955078125e-07,
 'maxfev': None,
 'verbose': 0,
 'xtol': 1.1920928955078125e-07}

Example 1

sherpa> set_method("levmar")
sherpa> set_method_opt("maxfev",750)

Set the "maxfev" option (maximum number of function evaluations) in the levmar method to 750.

Example 2

sherpa> set_method ("neldermead")
sherpa> set_method_opt ("maxfev", 2000)
sherpa> set_method_opt ("verbose", 1)

The optimization method is set to neldermead. The "maxfev" is set to 2000 and the verbosity is set to 1.

Bugs

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

Last modified: December 2008



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.