NAME: starfit PURPOSE: Single gaussian fit to a stellar image. DESCRIPTION: Fit the equation y=f(i) where: X = I MOD NX Y = I / NX R = SQRT( (X-A0)^2 + (Y-A1)^2 ) Z = R/A3 F(I) = A2*EXP(-Z^2/2) + A4 + A5*X + A6*Y + A7*X^2 + A8*Y^2 Function parameters Initial guess -------------------------------------------- -------------------- A0 = X location of center of Pluto, Maximum in image A1 = Y location of center of Pluto, Maximum in image A2 = height of gaussian for Pluto, Max - Min from image A3 = the 1/e width of the guassian, GUESS A4 = Constant term for the background, 0 A5 = Linear term in X for the background, 0 A6 = Linear term in Y for the background, 0 A7 = Quadratic term in X for the background, 0 A8 = Quadratic term in Y for the background, 0 CATEGORY: Function fitting CALLING SEQUENCE: starfit, image, guess, model, a, sigmaa INPUTS: image - Input image to be fitted, must be 2-d. guess - Input information for starting guess. guess = estimate of the 1/e full width of the seeing. OUTPUTS: model - The fitted model image is returned. a - The final coefficient array. sigmaa - The uncertainties on the coefficients. OPTIONAL OUTPUT PARAMETERS: COMMON BLOCKS: starfit_com - contains the xwidth of the image. SIDE EFFECTS: None. RESTRICTIONS: PROCEDURE: MODIFICATION HISTORY: Written by Marc W. Buie, Lowell Obs., 1993 January 13.