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

Home » Public Forums » archive » Re: choosing parameters for curvefit
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
Re: choosing parameters for curvefit [message #13062] Thu, 01 October 1998 00:00
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
nospam@ll.mit.edu (Joseph Scott Stuart) writes:
>
> I'm using curvefit to fit a function with a bunch of parameters to a
> dataset. I'd like to be able to easily specify that some parameters
> should be held constant on a particular run, while others are fit. I
> want to do this to explore how well the curvefit is going and to
> explore the parameter space. The only way I've come up with so far to
> do this is using commons blocks as below. If you can think of another
> way to do this, let me know. I'd like to avoid common blocks on
> aesthetic grounds, but there doesn't seem to be any other way to pass
> extra information to the function that curvefit calls.
>
> ... Code deleted ...

May I recommend that you try MPFIT, available from

http://astrog.physics.wisc.edu/~craigm/idl

MPFIT is a Levenberg-Marquardt fitter, translated from the FORTRAN
MINPACK-1 sources available on netlib. I have generally found this
fitter to be quite robust. So far, no complaints from the net either!

MPFIT allows you to easily hold parameters fixed (or not).
Investigate the documented PARINFO keyword, and also the tutorial page
accessible from the above page, for more information. In addition,
MPFIT allows you to put lower and upper bounds on parameter values.

Using MPFIT is easy. If you use MPFITFUN, you supply a function which
computes the "model" function, including vector functions, and of
course your data. MPFIT computes LM derivatives numerically, saving
you from the trouble of doing it yourself. Fitting two- or
three-dimensional data is just as easy.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@astrog.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: getting off the ground - mapping packages
Next Topic: choosing parameters for curvefit

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

Current Time: Wed Oct 08 19:34:47 PDT 2025

Total time taken to generate the page: 0.00503 seconds