;----------------fitting---------------- ;provide an initial guess of the functions parameters ;initial=[7,1,1.e8] shape=7. slope=1. N0=1.e6 A=[shape,slope,N0] weights=0 x=FLOAT(INDGEN(10)) y=[12.0, 11.0, 10.2, 9.4, 8.7, 8.1, 7.5, 6.9, 6.5, 6.1] yfit = CURVEFIT(x, y, weights,A, SIGMA, FUNCTION_NAME='gamma_fit') END