Bug fix for MPFITFUN (and MPFIT) [message #55766] |
Thu, 06 September 2007 21:24 |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Greetings folks--
I have published a bug fix for MPFITFUN. This bug fix only applies if
you are computing explicit derivatives.
The problem was that the derivatives were not being weighted by the
data uncertainties, and that can lead to very slow convergence. The
bug fix now causes the derivatives to be weighted.
In a related issue, the documentation of MPFIT has been corrected,
also regarding explicit derivatives. The required sign of the
derivatives was documented incorrectly. It turns out that because of
an implementation quirk, the sign of the derivative must be the
*opposite* of the expected one. I have tried to document this
carefully now. I won't correct the behavior of the program at this
stage, because that would be backward-incompatible.
Anybody who tried to use the previously "documented" definition would
have experienced non-converging fits, and they would have corrected it.
In an earlier discussion on the group, Dick French asked about the
sign convention for derivatives, and while I gave him the correct
information for his uber-special case (using "(EXTERNAL)" function
evaluation), it was incorrect for the common case. Sorry about that.
Yours,
Craig
The fitting routines can be found here:
http://cow.physics.wisc.edu/~craigm/idl/fitting.html
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|