KPG1_GAUFx

Fits a Gaussian to a one-dimensional array of data

Description:

This routine fits a Gaussian to a one-dimensional array of data. It finds the amplitude, centre, sigma and background levels by an iterative method.

Invocation

CALL KPG1_GAUFx( DATA, LBND, UBND, NITER, TOLL, AMP, X0, : SIGMA, BACK, STATUS )

Arguments

DATA( LBND:UBND ) = ? (Given)
The data array to be fitted by a Gaussian.
LBND = INTEGER (Given)
The lower bound of the data array.
UBND = INTEGER (Given)
The upper bound of the data array.
NITER = INTEGER (Given)
The maximum number of refining iterations.
TOLL = REAL (Given)
The accuracy criterion: absolute for the centre and relative for the amplitude and width. The accuracy of back is assessed as a fraction of the Gaussian amplitude.
AMP = REAL (Returned)
The Gaussian amplitude.
X0 = REAL (Returned)
The Gaussian centre.
SIGMA = REAL (Returned)
The sigma of the Gaussian.
BACK = REAL (Returned)
The background signal level.
STATUS = INTEGER (Given and Returned)
The global status.

Notes:

There is a routine for each numeric data type: replace " x" in the routine name by D, R, I, W, UW, B, UB as appropriate. The array supplied to the routine must have the data type specified.