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
 Multi Peak Fit custom/user made fitting routin
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

a.abc.b35

175 Posts

Posted - 06/09/2011 :  2:24:49 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8
Operating System: windows 7
...................
Hi, I have a fitting routine (say AFit) which is written in origin C (inside the fitting function organiser). I use this to fit my data with a single peak. Now what I want is, I want to fit two of AFit to the data. Its exactly like fitting a multi gauss fit/ lorentz fit. But I don't know how to write a fitting routine for a multi peak fit. Initially I thought to do the following :
Fit = AFit + AFit (assuming this is done same way in multi gauss/lorentz fit). But that seems to fail randomly ! Can anyone tell me / direct me to a web resource (in the forum or originlab website) where from I can learn to do that ?
Thanks in advance.

AB

Hideo Fujii

USA
1582 Posts

Posted - 06/09/2011 :  3:21:48 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi AB,

You can make a user-defined peak function when you define the function (which means your function has at least four parameters: y0 as the offset, X Center, X Width, and Amplitude/Area). You can read how to set your function as a peak function at:

http://www.originlab.com/www/helponline/Origin/en/UserGuide/Define_a_Peak_Function.html

(Or, in Origin help section: Peak Analyzer> Peak Analyzer Reference> Define a Peak Function.
Note that PFW category may be not improtant if you use the function in NLFit rather than in Peak Analyzer.)

Once you get a peak function, you should be use the function for replicas for multiple peaks.

At least the above should work in Origin 8.5.

--Hideo Fujii
OriginLab
Go to Top of Page

a.abc.b35

175 Posts

Posted - 06/10/2011 :  2:48:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hideo, I know how to make a peak function. The fitting routin (AFIT) is a peak function !
My question was how to make a multi-peak function...can anyone please answer that part ?

AB
Go to Top of Page

easwar

USA
1964 Posts

Posted - 06/10/2011 :  3:15:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi AB,

What Hideo was pointing out was that you don't need to make a multi-peak fitting function. Once you have a function for fitting one peak, you can use the "Replica" feature in NLFit to fit multiple peaks in a dataset using that single-peak function.

To fit using replicas, do the following:
1> With your data plotted, open NLFit and select your function
2> Click Advanced in the left panel list under Settings tab
3> On the right panel set the number of replicas drop-down to (no. of peaks -1). So if you have two peaks set this to 1
4> Go to Parameters tab and assign values to the sets of parameters for each peak and then complete the fit

I just tried this in 8.0SR6 and 8.5.1SR1 and it worked fine. If you are unable to do this, contact tech support and send your fitting function file and your data/opj.

Easwar
OriginLab.

Go to Top of Page

a.abc.b35

175 Posts

Posted - 06/10/2011 :  5:30:57 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The Replica (with a + sign in front of it) is not active.
Am using SR6 Origin 8.0.

AB
Go to Top of Page

easwar

USA
1964 Posts

Posted - 06/10/2011 :  5:41:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi AB,

The replica feature was grayed out in older versions only for surface fitting functions. From your posts it does not appear you have a surface fit function? As posted earlier, I tried 8.0SR6 and it works fine.

Please contact tech support so they can see what is going on with your version. As I said earlier, also send your FDF and data so we can try.

Easwar
OriginLab
Go to Top of Page

a.abc.b35

175 Posts

Posted - 06/10/2011 :  11:38:16 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
How do I contact them ? Please let me know.

AB
Go to Top of Page

easwar

USA
1964 Posts

Posted - 06/11/2011 :  09:18:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi AB,

Click the "Send files to tech support" link on the top right of this page.
Attach your FDF and OPJ.

Easwar
Go to Top of Page

a.abc.b35

175 Posts

Posted - 06/18/2011 :  1:15:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
@ easwar: please look at this topic:http://www.originlab.com/forum/topic.asp?TOPIC_ID=9543
....
I have described my problem there. Hopefully you can help, as you have done before many a times . Thanks is advance.

AB
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