Function Specification

The functions to be fitted to data are
linear combinations of a set of, so called, ``basic'' functions. Basic
functions are either defined in the system or defined by the user as
external FORTRAN routines. The actual combination of basic functions
is defined via an interactive editor, (MIDAS command `EDIT/FIT`)

Basic functions are specified by the name, the independent variable(s) and parameter(s), with optional guesses for the parameters, following the syntax:

The function namename(var1[,];par1[,]) [par1=value]

The number of independent variables of the function is determined by the string
`var1[,``]`. The actual names of the independent variables are
considered as dummy names but their number has to coincide with the
actual number of parameters of the function.
All the functions defined in a given fit **must**
have the same number of independent variables.

Parameters are defined by unique names after the semicolon in the function specification. Parameters are interpreted according to the position and to the number of independent variables in the function.

A parameter is generally given a first guess on the same line,
as `pari=value`,
it can also be fixed to a given value or kept proportional to
another parameter.
The parameter is defined as fixed with the symbol @ immediately
following the value
as `pari=value@`. Linear constrains between parameters are defined as `pari=parj*value` or `pari=parj/value`.

According to these rules, a one dimensional gaussian function is specified
with the `EDIT/FIT` command as

where1 GAUSS(X;A,B,C) A=10. B=3200.@ C=1.

A linear combination of a gaussian and a Cauchy distribution, centered at the same position is specified as

in this case, the maximum of the Cauchy distribution is determined by the corresponding parameter of the Gaussian.1 GAUSS(X;A1,B1,C1) A1=10. B1=3200. C1=1.

2 CAUCHY(X;A2,B2,C2) A2=A1/10. B2=B1 C2=4.

We include in table 8.1 a summary of the system basic functions; the actual mathematical expressions, with the meaning of the function parameters are given in section 8.8.