[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MPFIT, PS_FORM updates




Greetings!

I have made some small improvements to the MPFIT family of curve
fitting routines, and to the PS_FORM Postscript configuration
function, which you might find useful.

Find them here:  http://astrog.physics.wisc.edu/~craigm/idl/idl.html

--------------
To summarize, MPFIT, MPFITFUN, and MPFITEXPR are routines for curve
and surface fitting, based on MINPACK-1.  The algorithms are generally
more stable than just the raw Levenberg-Marquardt routines of
CURVEFIT.  The MPFIT function also allows you to place simple
constraints on parameter values, to fix parameters, etc. via the
PARINFO keyword.

A tutorial is included on the web page above, and the routines are
fully documented internally.  New changes include:

 * some bugs fixed and requested features added.
 * the PARINFO keyword now accepts only the tags that are desired.
   For example, you can pass PARINFO=replicate({fixed:0},5).  In the 
   previous version you had to make a structure with all of the tags.
 * Analytic derivatives can be computed by the user-supplied function,
   if the keyword AUTODERIVATIVE=0 is passed.
 * you can tie parameter values together using the "TIED" tag in
   PARINFO.  Any arbitrary expression relating parameter values is
   allowed.  For example the following code, 
   
   PARINFO = replicate({tied:''},5)
   PARINFO(2).tied = 'P(0) + P(4)'
   P = MPFIT( ..., PARINFO=PARINFO, ...)
   	
   enforces the constraint that parameter number 2 is the sum of 
   parameters 0 and 4.  Parameter 2 would implicitly be considered
   "fixed" in this case since it is not a free variable.
 * the exception handling is meant to be more friendly (we'll see).

---------------
PS_FORM is a widget function, originally written by David Fanning to
configure the Postscript device for IDL.  I have almost entirely
re-written the function so that it includes support for an arbitrary
number of predefined formats and different paper sizes.  For european
users, an "A4" selection is supplied.

This version contains slight improvements and bug fixes from the
previous one.  Documentation is included with the function.

---------------
I'm going away on travel now, so presumably a huge bug will now be
discovered.  It's the way of the Internet.  Hope these routines are
useful to you!

Craig

-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL: craigmnet@astrog.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------