RFGFIT
Name
rfgfit
Purpose
Fit a radial gaussian to the input data (no linear term, width fixed).
Description
Fit the equation y=f(r) where:
F(r) = A0*EXP(-z^2/2) + A2
and
z=r/A1, A1 is constant
A0 = height of exp, A1 = sigma (the width).
A2 = constant term,
The parameters A0, A1, A2 are estimated and then CURVEFIT is
called. The gaussian is assumed to be centered at r=0.
Category
Function fitting
Calling Sequence
Result = RFGAUSSFIT(R, Y [, A])
Inputs
R: The independent variable. R must be a vector.
Y: The dependent variable. Y must have the same number of points
as R.
Outputs
The fitted function is returned.
Optional Output Parameters
A: The coefficients of the fit. A is a three-element vector as
described under PURPOSE.
Common Blocks
rf_gauss - Contains the constant gaussian width to use.
Side Effects
None.
Restrictions
Procedure
The initial guess of the intensity is the value of the point
with the smallest r value. The first point that drops below
half of the first is the guess at the width.
Modification History
DMS, RSI, Dec, 1983.
Rewritten to change initial guess, MWB, Lowell Obs., Dec. 1992.
Rewritten to remove background function, MWB, Lowell Obs., Jan. 1993.