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
 user defined fitting function (Lorentz + Gauss)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

zaneslovakia

Slovakia
7 Posts

Posted - 10/14/2014 :  11:02:46 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):OriginPro 8
Operating System:Windows 7

Hello everyone!

I need to fit my spectra that has 5 peaks: four of them have Lorentzian line shape, and one has Gaussian line shape. I thought to make an user-defined function (Analysis/Non linear curve fit) and came to the point where I need help. My question is: what should I write in the Fitting function organizer window under the field ''Function''?

Any help will be strongly appreciated!

greg

USA
1378 Posts

Posted - 10/14/2014 :  12:34:13 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
No need for some custom function.
First, make sure you are running the latest Service Release of version 8 : OriginPro 8.0.63.988 SR6
Run Help : Check for Updates if need be.

Select your data and choose Analysis : Peaks and Baseline : Peak Analyzer.
Use this as a guide:
http://www.originlab.com/Index.aspx?go=Support/VideoTutorials&pid=1883
When you get to the "Fit Peaks" page, click "Fit Control" where you can select individual functions for individual peaks.
Go to Top of Page

zaneslovakia

Slovakia
7 Posts

Posted - 10/23/2014 :  05:02:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Unfortunately I couldn't follow the steps suggested by Greg. However, I made a custom fitting function in Origin and in Fitting function organizer i put function:

y=y0 + (A1/(w1*sqrt(PI/2)))*exp(-2*((x-xc1)/w1)^2) +2*(A2/PI)*(w2/(4*(x-xc2)^2 + w2^2)) +2*(A3/PI)*(w3/(4*(x-xc3)^2 + w3^2)) +2*(A4/PI)*(w4/(4*(x-xc4)^2 + w4^2)) +2*(A5/PI)*(w5/(4*(x-xc5)^2 + w5^2))

and defined parameters:

y0,A1,xc1,w1,A2,w2,xc2,A3,w3,xc3,A4,w4,xc4,A5,w5,xc5. I left the ''x'' as a independent variable and ''y'' as a dependent. When I compiled the function everything went well, but I was unable to fit my curve with this custom function. Any suggestion about my further steps?
Go to Top of Page

zaneslovakia

Slovakia
7 Posts

Posted - 10/23/2014 :  10:38:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To explain my problem a bit in detail: When I enter parameters for position of maximums and width of peaks, after first iteration they change to unreasonable values (6,365E39 etc.) and the final fit result is usually one straight line. The message that appears is: Fit did not converge - mutual dependency exists between parameters.
You may have overparameterized the fitting function. Fixing one of them may eliminate this problem.
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