next up previous index
Next: How to get the Up: Minuit Commands Previous: Minuit Commands   Index

List of Minuit commands

    CALl <iflag>

Instructs Minuit to call subroutine FCN with the value of IFLAG=<iflag>. (The actual name of the subroutine called is that given by the user in his call to Minuit or MNEXCM; the name given in this command is not used.) If <iflag> > 5, Minuit assumes that a new problem is being redefined, and it forgets the previous best value of the function, covariance matrix, etc. This command can be used to instruct the user function to read new input data, recalculate constants, or otherwise modify the calculation of the function.

    CLEar

Resets all parameter names and values to undefined. Must normally be followed by a PARameters command or equivalent, in order to define parameter values.

    CONtour <par1> <par2> [devs] [ngrid]

Instructs Minuit to trace contour lines of the user function with respect to the two parameters whose external numbers are <par1> and <par2>. Other variable parameters of the function, if any, will have their values fixed at the current values during the contour tracing. The optional parameter [devs] (default value 2.) gives the number of standard deviations in each parameter which should lie entirely within the plotting area. Optional parameter [ngrid] (default value 25 unless page size is too small) determines the resolution of the plot, i.e. the number of rows and columns of the grid at which the function will be evaluated. [See also MNContour.]

    END

Signals the end of a data block (i.e., the end of a fit), and implies that execution should continue, because another Data Block follows. A Data Block is a set of Minuit data consisting of (1) A Title, (2) One or more Parameter Definitions, (3) A blank line, and (4) A set of Minuit Commands. The END command is used when more than one Data Block is to be used with the same FCN function. CALL FCNThe END command first causes Minuit to issue a CALL FCN with IFLAG=3, in order to allow FCN to perform any calculations associated with the final fitted parameter values, unless a CALL FCN 3 command has already been executed at the current FCN value. The obsolete command END RETurn is the same as the RETURN command.

    EXIT

Signals the end of execution. The EXIT command first causes Minuit to issue a CALL FCN with IFLAG=3, in order to allow FCN to perform any calculations associated with the final fitted parameter values, unless a CALL FCN 3 command has already been executed at the current FCN value. Then it executes a Fortran STOP.

    FIX <parno> [parno] ... [parno]

Causes parameter(s) <parno> to be removed from the list of variable parameters, and their value(s) will remain constant during subsequent minimizations, etc., until another command changes their value(s) or status.

    HELP [SET] [SHOw] [command]

If there are no arguments, causes Minuit to list the available commands. If argument SET or SHOW is specified, the list of recognized SET and SHOw commands is displayed. If a command name is specified as argument, a short explanation of the command syntax is given.

    HESse [maxcalls]

Instructs Minuit to calculate, by finite differences, the Hessian or error matrix. That is, it calculates the full matrix of second derivatives of the function with respect to the currently variable parameters, and inverts it, printing out the resulting error matrix. The optional argument [maxcalls] specifies the (approximate) maximum number of function calls after which the calculation will be stopped.

    IMProve [maxcalls]

If a previous minimization has converged, and the current values of the parameters therefore correspond to a local minimum of the function, this command requests a search for additional distinct local minima. The optional argument [maxcalls] specifies the (approximate) maximum number of function calls after which the calculation will be stopped.

    MIGrad [maxcalls] [tolerance]

Causes minimization of the function by the method of Migrad, the most efficient and complete single method, recommended for general functions (see also MINImize). The minimization produces as a by-product the error matrix of the parameters, which is usually reliable unless warning messages are produced. The optional argument [maxcalls] specifies the (approximate) maximum number of function calls after which the calculation will be stopped even if it has not yet converged. The optional argument [tolerance] specifies required tolerance on the function value at the minimum. The default tolerance is 0.1, and the minimization will stop when the estimated vertical distance to the minimum (EDM) is less than 0.001*[tolerance]*UP (see SET ERR).

    MINImize [maxcalls] [tolerance]

Causes minimization of the function by the method of Migrad, as does the MIGrad command, but switches to the SIMplex method if Migrad fails to converge. Arguments are as for MIGrad. Note that command requires four characters to be unambiguous with MINOs.

    MINOs [maxcalls] [parno] [parno] ...

Causes a Minos error analysis to be performed on the parameters whose numbers [parno] are specified. If none are specified, Minos errors are calculated for all variable parameters. Minos errors may be expensive to calculate, but are very reliable since they take account of non-linearities in the problem as well as parameter correlations, and are in general asymmetric. The optional argument [maxcalls] specifies the (approximate) maximum number of function calls per parameter requested, after which the calculation will be stopped for that parameter.

    MNContour <par1> <par2> [npts]

Calculates one function contour of FCN with respect to parameters par1 and par2, with FCN minimized always with respect to all other NPAR-2 variable parameters (if any). Minuit will try to find npts points on the contour (default 20). If only two parameters are variable at the time, it is not necessary to specify their numbers. To calculate more than one contour, it is necessary to SET ERR to the appropriate value and issue the MNContour command for each contour desired.

    RELease <parno> [parno] ... [parno]

If <parno> is the number of a previously variable parameter which has been fixed by a command: FIX <parno>, then that parameter will return to variable status. Otherwise a warning message is printed and the command is ignored. Note that this command operates only on parameters which were at one time variable and have been FIXed. It cannot make constant parameters variable; that must be done by redefining the parameter with a PARameters command.

    REStore [code]

If no [code] is specified, this command restores all previously FIXed parameters to variable status. If [code]=1, then only the last parameter FIXed is restored to variable status. If code is neither zero nor one, the command is ignored.

    RETurn

Signals the end of a data block, and instructs Minuit to return to the program which called it. The RETurn command first causes Minuit to CALL FCN with IFLAG=3, in order to allow FCN to perform any calculations associated with the final fitted parameter values, unless a CALL FCN 3 command has already been executed at the current FCN value. Then it executes a Fortran RETURN.

    SAVe

Causes the current parameter values to be saved on a file in such a format that they can be read in again as Minuit parameter definitions. If the covariance matrix exists, it is also output in such a format. The unit number is by default 7, or that specified by the user in his call to MINTIO or MNINIT. The user is responsible for opening the file previous to issuing the SAVE command (except where this can be done interactively).

    SCAn [parno] [numpts] [from] [to]

Scans the value of the user function by varying parameter number [parno], leaving all other parameters fixed at the current value. If [parno] is not specified, all variable parameters are scanned in sequence. The number of points [numpts] in the scan is 40 by default, and cannot exceed 100. The range of the scan is by default 2 standard deviations on each side of the current best value, but can be specified as from [from] to [to]. After each scan, if a new minimum is found, the best parameter values are retained as start values for future scans or minimizations. The curve resulting from each scan is plotted on the output unit in order to show the approximate behaviour of the function. This command is not intended for minimization, but is sometimes useful for debugging the user function or finding a reasonable starting point.

    SEEk [maxcalls] [devs]

Causes a Monte Carlo minimization of the function, by choosing random values of the variable parameters, chosen uniformly over a hypercube centered at the current best value. The region size is by default 3 standard deviations on each side, but can be changed by specifying the value of [devs].

    SET BATch

Informs Minuit that it is running in batch mode.

    SET EPSmachine <accuracy>

Informs Minuit that the relative floating point arithmetic precision is <accuracy>. Minuit determines the nominal precision itself, but the SET EPS command can be used to override Minuit's own determination, when the user knows that the FCN function value is not calculated to the nominal machine accuracy. Typical values of <accuracy> are between 10-5 and 10-14.

    SET ERRordef <up>

Sets the value of UP (default value= 1.), defining parameter errors. Minuit defines parameter errors as the change in parameter value required to change the function value by UP. Normally, for chisquared fits UP=1, and for negative log likelihood, UP=0.5.

    SET GRAdient [force]

Informs Minuit that the user function is prepared to calculate its own first derivatives and return their values in the array GRAD when IFLAG=2 (see specification of the function FCN). If [force] is not specified, Minuit will calculate the FCN derivatives by finite differences at the current point and compare with the user's calculation at that point, accepting the user's values only if they agree. If [force]=1, Minuit does not do its own derivative calculation, and uses the derivatives calculated in FCN.

    SET INPut [unitno] [filename]

Causes Minuit, in data-driven mode only, to read subsequent commands (or parameter definitions or title) from a different input file. If no [unitno] is specified, reading reverts to the previous input file, assuming that there was one. If [unitno] is specified, and that unit has not been opened, then Minuit attempts to open the file [filename] if a name is specified. If running in interactive mode and [filename] is not specified and [unitno] is not opened, Minuit prompts the user to enter a file name. If the word REWIND is added to the command (note: no blanks between INPUT and REWIND), the file is rewound before reading. Note that this command is implemented in standard Fortran 77 and the results may depend on the operating system; for example, if a filename is given under VM/CMS, it must be preceeded by a slash.

    SET INTeractive

Informs Minuit that it is running interactively.

    SET LIMits [parno] [lolim] [uplim]

Allows the user to change the limits on one or all parameters. If no arguments are specified, all limits are removed from all parameters. If [parno] alone is specified, limits are removed from parameter [parno]. If all arguments are specified, then parameter [parno] will be bounded between [lolim] and [uplim]. Limits can be specified in either order, Minuit will take the smaller as [lolim] and the larger as [uplim]. However, if [lolim] is equal to [uplim], an error condition results.

    SET LINesperpage

Sets the number of lines that Minuit thinks will fit on one page of output. The default value is 24 for interactive mode and 56 for batch.

    SET NOGradient

The inverse of SET GRAdient, instructs Minuit not to use the first derivatives calculated by the user in FCN.

    SET NOWarnings

Supresses Minuit warning messages. SET WARnings is the default.

    SET OUTputfile <unitno>

Instructs Minuit to write further output to unit <unitno>.

    SET PAGethrow <integer>

Sets the carriage control character for ``new page'' to <integer>. Thus the value 1 produces a new page, and 0 produces a blank line, on some output devices (see TOPofpage command).

    SET PARameter <parno> <value>

Sets the value of parameter <parno> to <value>. The parameter in question may be variable, fixed, or constant, but must be defined.

    SET PRIntout <level>

Sets the print level, determining how much output Minuit will produce. The allowed values and their meanings are displayed after a SHOw PRInt command, and are currently <level>=:

-1
no output except from SHOW commands
0
minimum output (no starting values or intermediate results)
1
default value, normal output
2
additional output giving intermediate results.
3
maximum output, showing progress of minimizations.
Note: See also the SET WARnings command.

    SET RANdomgenerator <seed>

Sets the seed of the random number generator used in SEEk. This can be any integer between 10 000 and 900 000 000, for example one which was output from a SHOw RANdom command of a previous run.

    SET STRategy <level>

Sets the strategy to be used in calculating first and second derivatives and in certain minimization methods. In general, low values of <level> mean fewer function calls and high values mean more reliable minimization. Currently allowed values are 0, 1 (default), and 2.

    SET TITle

Informs Minuit that the next input line is to be considered the (new) title for this task or sub-task. This is for the convenience of the user in reading his output. This command is available only in data-driven mode; in Fortran-callable mode use CALL MNSETI.

    SET WARnings

Instructs Minuit to output warning messages when suspicious conditions arise which may indicate unreliable results. This is the default.

    SET WIDthpage

Informs Minuit of the output page width. Default values are 80 for interactive jobs and 120 for batch.

    SHOw XXXX

All SET XXXX commands have a corresponding SHOw XXXX command. In addition, the SHOw commands listed starting here have no corresponding SET command for obvious reasons. The full list of SHOw commands is printed in response to the command HELP SHOw.

    SHOw CORrelations

Calculates and prints the parameter correlations from the error matrix.

    SHOw COVariance

Prints the (external) covariance (error) matrix.

    SHOw EIGenvalues

Calculates and prints the eigenvalues of the covariance matrix.

    SHOw FCNvalue

Prints the current value of FCN.

    SIMplex [maxcalls] [tolerance]

Performs a function minimization using the simplex method of Nelder and Mead. Minimization terminates either when the function has been called (approximately) [maxcalls] times, or when the estimated vertical distance to minimum (EDM) is less than [tolerance]. The default value of [tolerance] is 0.1*UP (see SET ERR).

    STAndard

Causes Minuit to execute the Fortran instruction CALL STAND where STAND is a subroutine supplied by the user.

    STOP

Same as EXIT.

    TOPofpage

Causes Minuit to write the character specified in a SET PAGethrow command (default = 1) to column 1 of the output file, which may or may not position your output medium to the top of a page depending on the device and system. This command can be expected to work properly only for printed output, unfortunately it does not solve the IBM terminal problem.


next up previous index
Next: How to get the Up: Minuit Commands Previous: Minuit Commands   Index
Back to CERN | IT | ASD | CERN Program Library Home
MG (last mod. 1998-08-19)