Conditional Curve Fitting with multiple Gaussian Components using MPFIT [message #75973] |
Wed, 11 May 2011 06:41  |
Jeffrey Chan
Messages: 3 Registered: May 2011
|
Junior Member |
|
|
Hi, everyone, I just did a search on internet and couldn't find a
suitable solution on my problem, so I send an email to Dr. Fanning,
and he told me to ask here.
I am currently using IDL for doing some data analysis, including
curve fitting with Gaussian functions.
I tried to use the MPFIT package to construct a model three-Gaussian-
component curve (say Gaussian A + Gaussian B + Gaussian C ) and give
suitable estimates for the fitting program.
The problem is that, there are some constrains/conditions within
these 3 Gaussians, i.e. there are not really independent to each
other. For example, the sigma of Gaussian A must be greater than
Gaussian B, but these two sigmas are not related to each other by an
equation so i cannot parametrize them.
Is there any way so I can specify conditions like that in the
fitting routine?
Thanks
|
|
|
Re: Conditional Curve Fitting with multiple Gaussian Components using MPFIT [message #76036 is a reply to message #75973] |
Thu, 12 May 2011 20:50  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On May 11, 9:41 am, Jeffrey Chan <jeffreyr...@gmail.com> wrote:
> Hi, everyone, I just did a search on internet and couldn't find a
> suitable solution on my problem, so I send an email to Dr. Fanning,
> and he told me to ask here.
>
> I am currently using IDL for doing some data analysis, including
> curve fitting with Gaussian functions.
>
> I tried to use the MPFIT package to construct a model three-Gaussian-
> component curve (say Gaussian A + Gaussian B + Gaussian C ) and give
> suitable estimates for the fitting program.
> The problem is that, there are some constrains/conditions within
> these 3 Gaussians, i.e. there are not really independent to each
> other. For example, the sigma of Gaussian A must be greater than
> Gaussian B, but these two sigmas are not related to each other by an
> equation so i cannot parametrize them.
>
> Is there any way so I can specify conditions like that in the
> fitting routine?
What you are doing is fraught with difficulty, so good luck!
You will find a suggestion on how to achieve what you are doing from a
comp.lang.idl-pvwave thread from 31 Oct 2008 entitled, "Another MPFIT
question" Just bear in mind that your desired constraint,
sigma[A] > sigma[B]
can be rewritten as
sigma[A] - sigma[B] > 0
which is just the kind of constraint discussed in that article.
Best wishes,
Craig
|
|
|