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
 Fitting one dataset as funct. of multiple datasets
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

nuf

Denmark
7 Posts

Posted - 06/14/2021 :  03:52:53 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 2021b 64bit SR1
Operating System: Win 10 64bit

I have a problem with nonlinear fitting of one dataset as a function of other multiple datasets.

I try to follow the online tutorial and I seem to enter the information correct in the "Fitting Function Organizer", but once I try to perform the fitting, the setup on the screen to enter the information about my data does not match the online tutorial and apparently I enter the information wrongly.

The online tutorial is here:
https://www.originlab.com/doc/Tutorials/Fitting-Datasets
(4.2.2.8 Fitting One Dataset as a Function of Other Datasets)

Any help?

Edited by - nuf on 06/14/2021 04:31:00 AM

YimingChen

1685 Posts

Posted - 06/14/2021 :  08:48:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Can you attach a screenshot of your NLFit dialog? You need to specify the input and output columns manually as shown in the first figure of that tutorial page. Also please check the initial values of the fitting parameters.

James
Go to Top of Page

nuf

Denmark
7 Posts

Posted - 06/14/2021 :  09:31:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I have attached a number of screenshots to visualize my process. I suspect I do something wrong in the last slide where I have to enter "Input Data" because it does not look like the online tutorial.







Go to Top of Page

nuf

Denmark
7 Posts

Posted - 06/14/2021 :  09:35:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Here is an image of what I hope to see eventually. I have manually fitted the 4 ref spectra to obtain the "Fitted spec" as a sum of these ref spectra.


Go to Top of Page

YimingChen

1685 Posts

Posted - 06/14/2021 :  09:58:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In the NLFit dialog Data Selection page, can you delete the data ranges in Input Data entry. Then you should only see one Range, and within the range you need to manually specify x's and y. See figure below.



James
Go to Top of Page

nuf

Denmark
7 Posts

Posted - 06/14/2021 :  10:41:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I cannot enter similar to what you enter.
I can remove the "Ranges" until one is left.
But I would like to enter "[test]test!(B,C,D,E,F)".
Or "[test]test!(B"PE",C"PC",D"APC",E"Chl-La",F"RAWSPEC")".
However, the program deletes what I enter or changes it even before I finish writing.
Also, if I try to use "Data Browser" or "Select from Worksheet" I cannot enter the text I want because there seems to be some auto-correction going on.
Could it be due to a mistake in my defined function? Or a bug in the current version of the program?
Go to Top of Page

YimingChen

1685 Posts

Posted - 06/14/2021 :  11:01:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I followed the steps you showed above to build the fitting function and I am also running Origin 2021b. Please see the gif. Please share with us your fitting function file (.fdf) that We can look into it.




James

quote:
Originally posted by nuf

I cannot enter similar to what you enter.
I can remove the "Ranges" until one is left.
But I would like to enter "[test]test!(B,C,D,E,F)".
Or "[test]test!(B"PE",C"PC",D"APC",E"Chl-La",F"RAWSPEC")".
However, the program deletes what I enter or changes it even before I finish writing.
Also, if I try to use "Data Browser" or "Select from Worksheet" I cannot enter the text I want because there seems to be some auto-correction going on.
Could it be due to a mistake in my defined function? Or a bug in the current version of the program?


Edited by - YimingChen on 06/14/2021 11:01:50 AM
Go to Top of Page

nuf

Denmark
7 Posts

Posted - 06/14/2021 :  11:10:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Here is the zipped file of the FDF.

https://my.originlab.com/ftp/forum_and_kbase/Images/PBP_multiindep.zip
Go to Top of Page

YimingChen

1685 Posts

Posted - 06/14/2021 :  2:49:01 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
For some reason when you defined the fitting parameters, Origin failed to recognize them. As you set the names to C_pe,C_pc,C_apc,C_chl. But they changed to P1, P2, P3, P4 in code builder. This doesn't happen on my PC. Do you remember if you manually change the parameter names?

Can you also try define the function again and see if it can be reproduced.

James
Go to Top of Page

nuf

Denmark
7 Posts

Posted - 06/14/2021 :  3:18:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I don't know how the P1, P2, P3, P4 names came about. I did not enter them. Maybe it is the default names and the program does not like my names.

Here is what I did next:
I have made a new function where I use the same formula but different names, so the outcome should be the same.
I use s1, s2, s3, s4 for my reference spectra, and P1, P2, P3, P4 for parameter names.
I set 0<=P<=3 for all parameters.

And then it worked beautifully. Maybe there is a bug in the program with respect to understanding names with underscore. In any case, I can live with the default parameter names.

Thanks for your help!
Go to Top of Page

nuf

Denmark
7 Posts

Posted - 06/14/2021 :  3:22:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Oh, and I also removed a hyphen in one of the column names.
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