Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
I'm trying to curvefit some intensities that I have projected into a MAP_SET coordinate system via MAP_IMAGE. I would like to get the fit of the peak intensities as a function of latitude and longitude. Anyone have any suggestions, or has anyone actually done this ? Nicholas nicholas@uap.nrl.navy.mil
On 21 May 1997, J.M. Zanotti wrote: > I use CURVEFIT (on PV-WAVE CL Version 6.05 (sun4 solaris sparc)) to perform > non-linear least sqares fitting. It works rather well, but once the fit is > performed, the vector of standard deviations for parameters (named Sigmaa) > seems to give very large values: for a given set of data, the error on > parameters is ten times greater with Curvefit than, for exemple, with > Kaleidagraph. IDL's CURVEFIT should be based on Bevington's CURFIT algorithm. I've widely used CURFIT in my Fortran programs. In general if I want to fit my data with a function y=f(x,a1,a2,...an) I use a "fitting" program to get the best fit (that will be a loop calling curfit until the chisquare converges to a stable minimum). I trust the values of a1...an but not their errors. To get meaningful errors, I use a "grid" program. It depends how many "interesting" fit parameters there are. Usually I consider 1 or 2 parameters as interesting. In this case I do a grid on such parameter(s) a loop with a1 stepped from A0 to A0+na*deltaA a loop with a2 stepped from B0 to B0+nb*deltaB For each grid point I use curfit to fit y=f(x,A0,B0,a3..an), i.e. the fitted parameters are now n-2 and A0,B0 are FIXED (at different values in each grid point). I then report chisquare as a function of a1 (a curve) or as afunction of a1,a2 (image) and determine the locus in which chisquare is less than chisquaremin + deltachi, where deltachi is a value corresponding to the confidence level you want (e.g. 2.71 for 90% confidence and one interesting parameter). It should not be difficult to write a wrapper like that around IDL's curvefit. ------------------------------------------------------------ ---------------- Lucio Chiappetti - IFCTR/CNR - via Bassini 15 - I-20133 Milano (Italy) ------------------------------------------------------------ ---------------- Fuscim donca de Miragn E tornem a sta scio' in Bregn Che i fachign e i cortesagn Magl' insema no stagn begn Drizza la', compa' Tapogn (Rabisch, II 41, 96-99) ------------------------------------------------------------ ---------------- For more info : http://www.ifctr.mi.cnr.it/~lucio/personal.html ------------------------------------------------------------ ----------------