[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MPFIT update
I'd like to announce some updates to my least squares fitting package
for IDL called MPFIT. MPFIT is based on the robust routines in
MINPACK-1 (available from netlib.org), and generally more crash
resistant than the IDL built-in routines. In addition, MPFIT allows
you much better control over parameters, including holding them fixed,
etc.
* I have tried to optimize MPFIT for speed as much as I can. The
scary thing is, when I started to make things more vectorized the
routine got *slower*. I think this is the limit!
As a side note, I wholeheartedly recommend *not* using analytical
derivatives. For most applications they appear to be slower to
compute and don't necessarily produce a better answer. Just let
MPFIT do its numerical-derivative-thang.
* A new routine MPCURVEFIT, a drop-in replacement for IDL's
CURVEFIT, but with the bells and whistles you come to know and
expect from the MPFIT package.
* A new routine MPFIT2DFUN which makes fitting 2-D images much easier.
* Two new routines MPFITPEAK and MPFIT2DPEAK which are drop-in
replacements for IDL's GAUSSFIT and GAUSS2DFIT, but use MPFIT as
the fitting engine. I also have a different way of estimating the
starting parameters which I feel is superior. Please prove me
wrong! Thanks to Octavi Fors <octavi@astro.yale.edu> for prodding
me and sending me sample data.
I feel like MPFIT is becoming pretty stable now. I admit that it is
not as fast as CURVEFIT, but in my applications, speed is not
everything. My highest goals are for the fitting routine not to crash
and to return sane answers.
Happy fitting,
Craig
http://cow.physics.wisc.edu/~craigm/idl/idl.html
--
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------