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
 LabTalk Forum
 multipel gaussian/ multipel data sets
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

menhart@ii

USA
23 Posts

Posted - 02/24/2017 :  1:44:13 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
is is possible to use the multiple peaks NLLS function on multiple data sets?

i want to globally link xc over several data sets.

the multiple peak fitter works well on single data sets. but when i move to multiple data sets so i can link the, it kicks me back down to a single gaussian. do i need to program in my own multiple gaussian function? that seems silly...

yuki_wu

896 Posts

Posted - 02/27/2017 :  12:34:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Please take a look at this knowledge base item and see if this applies to you:
http://www.originlab.com/doc/LabTalk/examples/Curve-Fitting#Global_Fit_with_Parameter_Sharing_on_Plot_Segments

Regards,
Yuki
OriginLab
Go to Top of Page

menhart@ii

USA
23 Posts

Posted - 03/04/2017 :  3:17:50 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
no not really.... i have been using origin since v1 (i.e. when it was still part of microcal!) and i know about global fitting. this KB entry describes that,a nd how to use script to do to that.

that is fine. i understand i can code my own multiple gaussian function, independent of the Origin provided one, and do that. but i assume the built in one is perhaps faster and more efficient, and id rather no re-invent the wheel if not necessary.

so my question is more about how multiple peaks is implemented in O2016 (i will soon upgrade to O2017 if that makes a difference). when i fit a single data set to multiple gaussians using the built in multiple peaks instance of the guassian function, it works well. but as soon as i load multiple data sets, it automatically revert to single guassian, and i cannot do multiple guassian in a global manner. i would like to link xc and perhaps w across all data sets

so - do i have to code my own user function?
Go to Top of Page

yuki_wu

896 Posts

Posted - 03/06/2017 :  03:42:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I am sorry that we cannot do sequential fit with a multiple peaks function at present, but this feature is targeted to be included in a future release. It may be achieved by an advanced APP, so keep an eye out for this app's release.

However, there is a workaround. For example, I assume that every dataset has 3 Gaussian peaks:

1. New a user defined fitting function

2. Set the variables and parameters
Independent Variables: x
Dependent Variables: y
Parameter Names: y0,xc1,w1,A1,xc2,w2,A2,xc3,w3,A3
Function Form: Equations

3. Define the fitting function in Function box by quoting built-in Gauss functions:
y = y0 + nlf_Gauss(x, 0, xc1, w1, A1) + nlf_Gauss(x, 0, xc2, w2, A1) + nlf_Gauss(x,0, xc3, w3, A3)

4. Save the function

As a result, you can perform global fitting and then share the parameters in multiple datasets by using this function. Note that properly initialized parameter is the key to success.

If this workaround dosen’t help, you could send your data to us (tech@originlab.com), so that we can try more on your data.

Regards,
Yuki
OriginLab
Go to Top of Page

menhart@ii

USA
23 Posts

Posted - 03/08/2017 :  2:22:29 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
thx yes - i have done that.

or almost that - i wrote my own N*Guass functions. maybe the built in one is faster, but either way - speed is not the issue.

i just had to implement {2Gauss, 3Gauss 4Gauss, 5Guass...} functions so it's not terrible convenient.
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