NAME: rqgfit PURPOSE: Fit a radial gaussian function to the input data (no linear term). DESCRIPTION: Fit the equation y=f(r) where: F(r) = A0*EXP(-z^2/2) + A2 + A3*r^2 and z=r/A2 A0 = height of exp, A1 = sigma (the width). A2 = constant term, A3 = quadratic 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 = RQGAUSSFIT(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 four-element vector as described under PURPOSE. COMMON BLOCKS: None. 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 linear term, MWB, Lowell Obs., Jan. 1993.