Re: Problems with curvefit [message #8476] |
Wed, 12 March 1997 00:00 |
brian.jackel
Messages: 23 Registered: May 1996
|
Junior Member |
|
|
In article <33267B6E.540@igi.pd.cnr.it> Emilio Martines <martines@igi.pd.cnr.it> writes:
> Hello. I am using curvefit in IDL 4.0.1 for fitting a set of data point
> with a curve of the form
> y=a*(exp((x-b)/c)-1)
> where x is the dependent variable and a,b,c are the fit parameters.
> It usually works fine, but sometimes, when the data are really bad, it
> goes into an infinite loop. Since the fit is embedded into a more
> complex program, this is very annoying. I would rather like the routine
> to exit nicely, even without performing the fit. Has anyone found the
> same problem? Is there a solution? Thanks a lot.
I've run across a problem with Curvefit, due to the use of a "repeat"
loop terminates with the following condition
endrep until chisqr le chisq1
that is not always met. By adding some kind of counter
nreps= nreps + 1
inside the loop, and checking for it
endrep until (chisqr le chisq1) or (nreps ge 6)
an exit can be forced. Not a great fix, but it seems to work.
There have been some minor changes to Curvefit in version
5.0, but the problem with the repeat loop is still there.
Brian Jackel
|
|
|