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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 multiple peak fitting with an OriginC function

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
pirzadeh Posted - 01/17/2003 : 07:49:59 AM
How can I do a mutiple peak fitting with an asymmetric Gaussian function which was defined in OriginC?
1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 01/17/2003 : 4:20:35 PM
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.


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000