FIT_GAUSSIAN 

Call: FIT_GAUSSIAN


reference

Should contain on entry the Histogram to be fitted.

This is usually a global variable that has been returned by a call to BOOK_HISTOGRAM or to GET_HISTOGRAM. This argument may also be an expression that results in a histogram.

The argument is not modified by the procedure.

[Mandatory argument.]


x

Should contain on entry a 1-dimensional Matrix in which the abscissa are stored of the points on which the fit is to be performed.

This vector should have the same size as y.

The argument is not modified by the procedure.

[Mandatory argument.]


y

Should contain on entry a 1-dimensional Matrix in which the function values are stored of the points on which the fit is to be performed.

This vector should have the same size as x.

The argument is not modified by the procedure.

[Mandatory argument.]


err_y

Should contain on entry the errors on the function values. These errors can either be specified in the form of a single Number, which is interpreted as a common error for all function values, or in the form of a 1-dimensional Matrix of errors for each point separately.

If a Matrix type argument is used, then it must have the same length as x and y.

The argument is not modified by the procedure.

[Mandatory argument.]


integral

Contains on successful completion the contents of the fitted Gaussian.

There is no need to initialise this argument - the initial value for the fitting procedure is set to the sum of the histogram or Y array.

This argument must be modifiable, i.e. it can not be a constant nor an expression. The argument will be of type Number.

[Mandatory argument.]


mean

Contains on successful completion the central value of the fitted Gaussian.

There is no need to initialise this argument - the initial value for the fitting procedure is set to the mean of the histogram or arrays.

This argument must be modifiable, i.e. it can not be a constant nor an expression. The argument will be of type Number.

[Mandatory argument.]


sigma

Contains on successful completion the standard deviation of the fitted Gaussian.

There is no need to initialise this argument - the initial value for the fitting procedure is set to the RMS of the histogram or arrays.

This argument must be modifiable, i.e. it can not be a constant nor an expression. The argument will be of type Number.

[Mandatory argument.]


error

The errors returned are the square roots of the diagonal elements of the covariance matrix, multiplied by a correction factor equal to:
\√(\χ\²/(#points - #parameters))

This correction factor is equal to 1 if the errors to the data points have been assigned correctly.

Errors are only returned upon request. The corresponding arguments must be modifiable, that is, they can neither be constants nor expressions. All errors are of type Number.


options

The options String may contain the keywords listed in the table below. The keywords should be separated by blanks or commata. Additional text may be added - no error message will be issued if unrecognised keywords are used.

Option Meaning Defaults
EQUAL Assume equal weight of all points Not default
NOPLOT Don't plot the histogram and fit Default
NOPRINT Don't print details during the fit Default
PLOT Plot the histogram with fit Not default
POISSON Assume Poisson errors Default
PRINT Print details during the fit Not default

Go to the top level, to Call, to FIT_GAUSSIAN, to the topic index, to the table of contents, or to the full text.

Formatted on 21/01/18 at 16:55.