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

Home » Public Forums » archive » Re: MPFIT2DPEAK with constraints
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: MPFIT2DPEAK with constraints [message #36636] Fri, 10 October 2003 07:51
c.carrano is currently offline  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
Re: MPFIT2DPEAK with constraints [message #36640 is a reply to message #36636] Thu, 09 October 2003 20:00 Go to previous message
Craig Markwardt is currently offline  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
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Controling sensetivity on widget_button
Next Topic: Re: netCDf problem in IDl 6.0

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

Current Time: Sat Oct 11 08:08:59 PDT 2025

Total time taken to generate the page: 0.72365 seconds