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 for Programming
 Forum for Origin C
 multiple peak fitting with an OriginC function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

pirzadeh

Germany
10 Posts

Posted - 01/17/2003 :  07:49:59 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
How can I do a mutiple peak fitting with an asymmetric Gaussian function which was defined in OriginC?

easwar

USA
1965 Posts

Posted - 01/17/2003 :  4:20:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Fitting multiple peaks in a dataset with a peak function is directly supported currently only for built-in functions such as Gaussian, Lorentzian etc. One can define the number of replicas (number of additional peaks in the dataset).

If you have many peaks in your dataset and want to fit them simultaneously with the same user-defined peak function, you should take a look at our Peak Fitting Module.

If you have just a few peaks that you want to fit simultaneously, you could do the following:

I am assuming here that you have two peaks in your dataset, and your Origin C function is of the form:
asymgauss(x,y0,xc,sig1,sig2,A);

1> load and compile your asymgauss function in Code Builder
2> start NLSF, and define a new function:
userdef parameters
indep vars: y0,xc1,sig1,sig2,A1,xc2,sig3,sig4,A2
dep vars: y
func definition:
y=asymgauss(x,y0,xc1,sig1,sig2,A1)+asymgauss(x,0,xc2,sig3,sig4,A2);

3> Uncheck "Use Origin C" box and set Form drop-down to Y-Script
4> Assign data etc, go to fit page, put in initial guess value for all parameters, and then perform the fit

So here the function is defined as a combination of two peak functions, and will fit a dataset with two peaks. Note that in the second term the offset is set to zero so that both peaks share the same baseline. If you have more peaks, you will have to add more terms. If there are many peaks, this obviously becomes cumbersome and the Peak Fitting Module will make the process much easier.

More information on the PFM is available here:
http://www.originlab.com/www/products/pfm/index.asp

Easwar
OriginLab.

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