08-15-2005 08:32 PM
08-15-2005 08:48 PM
08-15-2005 09:00 PM
08-15-2005 10:48 PM
08-16-2005 09:29 AM
ttrr is right..
Non-linear fits are very sensitive to inital guess and step size. I've used the Numerical Recipies Ameoba routine a lot, and while it does work well, it's not quite a "Hands off" sort of thing. Depending on SNR, and the degrees of freedom, it can take some hand-holding to get it to converge. Too small a step size and the routine can get stuck in a local "wrinkle", to large a step size and it can jump right over the minumum you are looking for and into no-mans-land.
I wrote up a gaussian fit vi that uses the Levenberg-Marquardt routine, and makes an initial guess based on input array max/min and location of the max. It calculates a rough FWHM to feed as an initial condition as well. For the cases I've used this routine on, it's been quite robust and reliable.
Sheldon