CALL: FIT_FUNCTION
The function that should be fitted is entered as a character
string. The function depends on the current set of global
variables, and has X as ordinate variable. The function should
only depend on global variables that are of type Number.
The global variables that are to be varied are those that appear
in the argument list of the procedure call. The other globals are
not changed.
The histogram is referenced via a global variable that has usually
been returned by a call to BOOK_HISTOGRAM or GET_HISTOGRAM. This
argument may also be an expression that results in a histogram.
The argument is not modified on return.
A 1-dimensional array that contains the ordinates of the
points to be fitted.
The vectors x, y and err_y must have the same length,
unless err_y is given as a scalar.
Not changed on exit.
A 1-dimensional array that contains the coordinates of the
points to be fitted.
The vectors x, y and err_y must have the same length,
unless err_y is given as a scalar.
In the initial estimate, the data points where y <= 0 are
skipped. If there are many such points which should
be taken into account for the fit, then convergence is
not guaranteed.
Not changed on exit.
A 1-dimensional array that contains the errors on the
coordinates of the points to be fitted.
This argument can also be a scalar, which is then used as
error for all points. If this argument is a vector, then
it must have the same length as x and y.
Not changed on exit.
The global variables for which optimum values are to be
determined have to appear in the argument list of the
procedure call.
These parameters must be given a suitable initial value of
type Number, for instance by using the GLOBAL statement.
On return of a successful fit, the global variables are
set equal to the optimum value found. The global variables
are of type Undefined if the fit fails.
The errors returned are the square roots of the diagonal elements
of the covariance matrix, multiplied by a correction factor equal
to:
sqrt(chi**2/(#points - #parameters))
This correction factor is equal to 1 if the errors to the data
points have been assigned correctly.
These arguments must be modifiable, that is, they can neither be
constants nor expressions.
The options string may contain the keywords listed in the table
below. The keywords should be separated by blanks or commas.
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
---------------------------------------------------------------------
Note: The EQUAL and POISSON options are ignored for matrix fits since
the errors on the points are explicitely provided in that case.
The plot is always made on a linear-logaritmic scale.
Keyword index.
Formatted on 10/11/98.