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.
|