Re: MPFIT2DPEAK with constraints [message #36636] |
Fri, 10 October 2003 07:51  |
c.carrano
Messages: 2 Registered: October 2003
|
Junior Member |
|
|
Craig Markwardt <craigmnet@REMOVEcow.physics.wisc.edu> wrote in message news:<onzng9lrud.fsf@cow.physics.wisc.edu>...
> 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
Thank you. I had inadvertently confused the functions
of the parinfo.value and ESTIMATES parameters. Passing
ESTIMATES=a0 to mpfit2dpeak fixes the sample code
above. Thank you for your help and, of course, your
valuable software contribution to the scientific
community.
- Charles
|
|
|