The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Global Fit with two Gaussians & constant integral
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Valerietti

2 Posts

Posted - 06/06/2019 :  06:49:27 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro2017
Operating System: Windows


I have a set of 10 curves that I'd like to fit with two partially overlapping gaussians.

With the "global fit" option of the non-linear curve fitting, I reproduced fairly well the curves.

However, I'd like to add the constraint that keeps constant the sum of the two gaussian curves, i.e. the global integral of the fitted curves.

May anyone help me with that?
Thank you in advance.

malgoska

Poland
36 Posts

Posted - 06/06/2019 :  07:42:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
you can try creating your own function defined like that:

y = y0 + A1/(w1*sqrt(pi/(4*ln(2)))) * exp(-4*ln(2)*(x-xc1)^2/w1^2) + (S-A1)/(w2*sqrt(pi/(4*ln(2)))) * exp(-4*ln(2)*(x-xc2)^2/w2^2)

with parameters: A1, w1, xc1, S, w2, xc2, y0.
with S being be the sum of the two areas, (S-A1) would be the area of the second Gaussian.
With such a function you can perform a global fit on 10 curves and share S (and anything else) among the fits. Of course, you can set it as constant value, as well.
Hope it helps, best regards,
malgoska
Go to Top of Page

Valerietti

2 Posts

Posted - 06/06/2019 :  11:54:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Malgoska,
Thank you for your help!
I'm gonna try this straight away!
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000