Set the minimization method.
Syntax: method <algorithm> [<# of trials/evaluations> [<critical delta>] [method-specific options]]
where <algorithm> is the method in use and the other arguments are control values for the minimization. Their meanings are explained under the individual methods. Note that all but leven require the MINUIT library from CERN to be linked into XSPEC. If any of the MINUIT library methods are set, then the error command will use the MINUIT MINOS command to find the confidence regions.
XSPEC is required to calculate derivates of the fit statistic with respect to the model parameters for both the leven and migrad methods. leven further requires second derivatives. By default, XSPEC calculates these using an analytic expression which assumes that partial 2nd derivatives of the model with respect to its parameters may be ignored. This may be changed by setting the USE_NUMERICAL_DIFFERENTIATION flag to “true” in the user’s startup Xspec.init initialization file. XSPEC will then calculate all derivatives numerically, which can be noticeably slower.
method leven [<# of eval> [<crit delta>] [<crit beta>]]
The default XSPEC minimization method using the modified Levenberg-Marquardt based on the CURFIT routine from Bevington. <# of eval> is the number of trial vectors before the user is prompted to say whether they want to continue fitting. <crit delta> is the convergence criterion, which is the (absolute, not fractional) difference in fit statistic between successive iterations, less than which the fit is determined to have converged.
<crit beta> refers to the |beta|/N value reported during a fit. This is the norm of the vector of derivatives of the statistic with respect to the parameters divided by the number of parameters. At the best fit this should be zero, and so provides another measure of how well the fit is converging. When this is set to a positive value, it will provide another fit stopping criterion in addition to that of the <crit delta> setting.
<# of eval>, <crit delta>, and <crit beta> may also be changed through the fit command.
method migrad [<# of eval> [<crit delta>]]
The MINUIT MIGRAD method. <# of eval> is the number of function evaluations to perform before giving up and <crit delta> is the convergence criterion.
XSPEC12.0 includes version94.1 of the CERN MINUIT library – dated August 1998. The manual for the library is included with the XSPEC12 documentation and can be accessed by
When minuit is used, the output from the fitting procedure is different from xspec’s normal behavior. It is written to the file mn_output.log in the current directory. For uncertainty calculations (the error command), XSPEC calls the equivalent MINUIT implementation (MNERRS).
Following the advice in section 5 of the MINUIT manual, instead of providing the full range of MINUIT methods, most of which are said to be inferior, we have chosen to give access to the robust migrad algorithm.
method minim [<# of evaluations> [<critical delta>] ]
The MINUIT MINIMIZE method, used MIGRAD unless it gets into trouble in which case it switches to SIMPLEX. <# of evaluations> is the number of function evaluations to perform before giving up and <critical delta> is the convergence criterion.
method monte [<# of evaluations> [<critical delta>] ]
The MINUIT SEEK method, a simple random sampling of parameter space (not recommended!). <# of evaluations> is the number of function evaluations to perform before giving up and <critical delta> is the convergence criterion.
method simplex [<# of evaluations> [<critical delta>] ]
The MINUIT SIMPLEX method. <# of evaluations> is the number of function evaluations to perform before giving up and <critical delta> is the convergence criterion.