Author |
Topic |
|
rhparker
USA
5 Posts |
Posted - 01/20/2015 : 11:12:06 PM
|
Origin Ver. and Service Release (Select Help-->About Origin): 9.0.0 SR2 b87 Operating System: Windows 7 64-bit
This is a bit complicated, but the solution is probably really simple, so please bear with me. I have three datasets, with errorbars, each of which is supposed to be a sine wave. The datasets should have the same amplitude, yoffset, and frequency, but two of the datasets should be constrained to have equal and opposite phases. I'm trying to do this fitting in Origin. To be clear, these are the sets of equations: yup = y0 + Amp*sin(2*pi/w*x+phidelta/2) ydn = y0 + Amp*sin(2*pi/w*x-phidelta/2) yoff = y0 + Amp*sin(2*pi/w*x+phi)
Now it seems to me that I can't simply do a global fit with shared parameters, with an additional constraint that two of the phases be equal and opposite, because Origin seems to make the error bars on the resulting phases be implausibly large. I already know the rough scale of the error bars of the fit parameters. So what I tried doing was making those three equations be my fit equation, and assigning each of the three datasets to be one of the output variables to fit. The fit worked, and gave parameters and error bars that are basically what I expected.
But here's where the problem comes in. I noticed that Origin wasn't using all my data for its fit--it was only using x-values where there were y-values for all three datasets. If, for example, I had taken a point for yup at X=3, but not for yoff, then the point at X=3 would not be included. I can tell this because of the number of points it says it used in the fit Log. So what I need to do is not only tell Origin which dataset should correspond to which output variable, but also which x-axis should be used for each dataset. And that's where I'm stuck. I've attached the screen I see in Origin--there's only one x-axis available to be selected.
This seems like it must be really simple to solve--it's just fitting three different datasets simultaneously, with each dataset having its own x-axis. Does anyone know how to do this? Thanks!
|
|
jasonzhao
China
262 Posts |
Posted - 01/21/2015 : 02:00:52 AM
|
Hello,
Would you please send your sample OPJ file for us to check? As your image shown, a user defined fitting function is used, so send us the Sinusoidal7.fdf file (could be under user files folder such as \OriginLab\90\User Files\fitfunc) as well. Please send to <tech@originlab.com>
Best regards, Jason Zhao OriginLab Tech Service |
Edited by - jasonzhao on 01/21/2015 02:02:33 AM |
|
|
rhparker
USA
5 Posts |
Posted - 01/21/2015 : 09:53:57 AM
|
Hi Jason, I sent the files to that address. Thanks for helping me with this issue! |
|
|
jasonzhao
China
262 Posts |
Posted - 01/21/2015 : 9:25:08 PM
|
Hello,
Would you like to send the mail again? Because you mail has not been received yet may be due to the transfer error.
Best regards, Jason Zhao OriginLab Tech Service |
|
|
rhparker
USA
5 Posts |
Posted - 01/22/2015 : 4:18:59 PM
|
I sent the files again. |
|
|
jasonzhao
China
262 Posts |
Posted - 01/22/2015 : 10:40:21 PM
|
Hello,
The Global Fit for Different Functions with Shared Parameters is designed for this kind of fitting:
Please create user defined fitting function like this:
y=yo + Amp*(s1*sin(2*pi/w*x+deltaphi/2)+s2*sin(2*pi/w*x-deltaphi/2)+s3*sin(2*pi/w*x+phi))
s1, s2 and s3 is used to control which parts of the fitting function is used. This tutorial shows Global Fit for Different Functions with Shared Parameters step by step: http://www.originlab.com/doc/Tutorials/Multi-Functions-Global-Fitting
In particular, yo, amp, w, deltaphi should be shared s1,s2,s3 should be fixed and set to 1 alternately.
Best regards, Jason Zhao OriginLab Tech Service |
Edited by - jasonzhao on 01/23/2015 12:28:36 AM |
|
|
|
Topic |
|
|
|