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

Home » Public Forums » archive » Re: constraining parameters in multi-Gaussian 1D fitting
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: constraining parameters in multi-Gaussian 1D fitting [message #45365 is a reply to message #45364] Mon, 05 September 2005 10:07 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"Jess" <jobrien@mso.anu.edu.au> writes:
> One constraint I am unable yet to do is: I = would like to be able to
> tie the peak flux of the Gaussians such that the peak flux of last
> Gaussian is always greater than that of the first Gaussian.
> I tried using
> parinfo((n_gauss-1)*3).tied = 'GT P[0]'
>
> However the tied structure of parinfo doesn't seem to be meant to
> accept operators like GT,LT, etc. ...

True. MPFIT's TIED fields are limited to equality constraints only.

...
> However this requires assigning rather tight bounds to P[0] which I
> really dont know well. Is there a smarter way I can do this using
> 'tied' or another structure in parinfo?

One approach is to fit one gaussian at a time starting with the
strongest one and working your way down to the fainter ones. This
assumes that the peaks are well enough separated that they can be fit
in succession. If the peaks are blended, well, that's a tough
situation.

Long ago I had somebody trying to do something similar, i.e. fit an
arbitrary number of gaussians with arbitrary centroids, widths and
amplitudes. I warned him that I thought it would turn into an
unconstrained mess, it did, and I think he eventually gave up. Sorry,
but least squares fitting is not mind reading. The more external
constraints you can apply, based on knowledge of the problem, the
better.

Craig



--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Concatenating arrays across chosen dimension
Next Topic: Another IDL 6.2 Project Problem

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

Current Time: Sun Oct 12 06:02:56 PDT 2025

Total time taken to generate the page: 1.91855 seconds