NAME: star_fun PURPOSE: Single 2-d gaussian image, support routine for STARFIT. DESCRIPTION: Evaluate the sum of one 2-d guassian and a 2-d 2nd order polynomial and optionally return the value of it's partial derivatives. Evaluate 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(-Z1^2/2) + A4 Function parameters -------------------------------------------- A0 = X location of center of Pluto, A1 = Y location of center of Pluto, A2 = height of gaussian for Pluto, A3 = the 1/e width of the guassian, A4 = Constant term for the background, CATEGORY Function fitting CALLING SEQUENCE: STARFIT_FUN,I,A,F[,PDER] INPUTS: I = Independent variable, actually, just an index into 2-d array. A = Parameters of equation described above. OPTIONAL KEYWORD PARAMETERS: XSIZE = width of image OUTPUTS: F = value of function at each F(I). OPTIONAL OUTPUT PARAMETERS: PDER = (N_ELEMENTS(I),9) array containing the partial derivatives. P(I,J) = Derivative at Ith point w/respect to Jth parameter. COMMON BLOCKS: starfit_com - contains the x-width of the array stored in A SIDE EFFECTS: NONE. RESTRICTIONS: NONE. MODIFICATION HISTORY: Written by Marc W. Buie, Lowell Observatory, 1993 January 13