Re: MPFIT2DPEAK with constraints [message #36640 is a reply to message #36636] |
Thu, 09 October 2003 20:00  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
c.carrano@att.net (Charles Carrano) writes:
> Greetings. I'm trying to understand how Craig
> Markwardt's peak fitting function MPFIT2DPEAK
> works when you wish to require that certain
> parameters be held constant.
>
> Specifically, I know that my data should peak
> at the origin and so I'd like to force the
> fitted Gaussian to peak there as well.
>
> Despite specifying that A[4] and A[5] be
> fixed using the PARINFO structure, the fitted
> Gaussian is not centered at the origin.
> Supplying PARINFO to MPFIT2DPEAK does change
> the fit but it actually makes it slighly worse.
> Anyone know what I might be doing wrong?
Greetings--
> zfit = mpfit2dpeak(z, a1, x, y, /tilt, PARINFO=pi)
The documented way to enter the initial parameters to MPFIT2DPEAK is
using the ESTIMATES keyword.
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|