comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Bug in MPFIT found
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Bug in MPFIT found [message #37101] Sun, 23 November 2003 18:05
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Greetings--

I don't normally post updates to my web page these days. On the other
hand, there are enough users of MPFIT that this is a good venue to
publish information about a bug that has been publicly corrected
today.

The bug probably affects all one parameter fits. Users should download
a new version of MPFIT. It is likely that all single-parameter fits
(or fits with a single varying parameter) will either fail, or
converge extremely slowly.

Bug details: the problem is in the way that MPFIT_LMPAR estimates
the parameter update for the next iteration. If there is only one free
parameter, then several logical steps are erroneously skipped. This
also applies if there are multiple parameters but only one is free;
or if all but one parameter is pegged at a limit. The workaround is to
download a new version of MPFIT. The vital change is on new line
1631, where
if nsing GT 1 then begin
should be changed to
if nsing GE 1 then begin ;; NOTE change to "GE"

Please see:
http://cow.physics.wisc.edu/~craigm/idl/idl.html (under curve fitting)

I apologize for how long it took to find this error. Happy fitting!

Yours,
Craig

P.S. Thanks to Peter Tuthill for pointing out the right test case.

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: modifying itools (ivolume)
Next Topic: Re: Access GOES McIDAS files?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 03:13:40 PDT 2025

Total time taken to generate the page: 0.87958 seconds