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
 All Forums
 Origin Forum
 Origin Forum
 Boltzmann fitting

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
robocop Posted - 02/11/2007 : 09:30:35 AM
Origin Version (Select Help-->About Origin): 7
Operating System: WINDOWS XP

Hi all,
I performed a wet lab experiment where the results are 96 data sets.
Each data set should give a sigmoidal curve, and the fitting has to be done using the Boltzmann model. The experimental points, however, drop quickly right after A2, the maximum y value. By fitting the whole set of data I obviously don't get the wanted sigmoid. So I need a way to AUTOMATICALLY cut the data set for data with x>xA2 AND y, say, lower than 0.95*A2.
I believe this should probably be put in the 'before fit' script section, but I don't know neither the C language nor Origin, so any help would be very useful.
Thanks
7   L A T E S T    R E P L I E S    (Newest First)
robocop Posted - 02/20/2007 : 04:56:09 AM
Hi Easwar,
sorry for my late response, I was on a journey.
I'll surely try your solution as soon as I'll be back in my lab.
Thanks a lot,

robocop
easwar Posted - 02/14/2007 : 5:30:13 PM
Hi robocop,

Here is a possible solution:

1> Open the Boltzmann FDF in the NLfit tool - make a copy and work with the copy if you don't want to change the function shipped in the product
2> Go to Scripts->Parameter Initialization and uncheck the "Enable automatic parameter initialization" check box. This is because the param init will work on the entire dataset and does not initialize the parameters well - we will deal with that in the "before fit" code
3> Go to Scripts->Before Fit and paste the following script code in the edit box, AND check the Enabled check box:

%a = nlsf.fitdata$;
limit %a;
mks1 = 1;
mks2 = limit.imax;

nlsf.p1=limit.ymin;
nlsf.p2=limit.ymax;
nlsf.p3=limit.xmin+0.5*limit.xmax;
nlsf.p4=1;



Note that above code contains parameter initialization at the end for the selected range...you can improve it further as needed.

4> Save the function and then try fitting to your data.

So as long as your data peaks and then falls off, and you want to fit up to the peak, the above should work...the code is just looking for max in y value and setting the data limit to that point to fit.

I removed the data you pasted because it is too long and hard to read thread....I have pasted an image below....

Hope this helps.

Easwar
OriginLab



robocop Posted - 02/14/2007 : 12:23:42 PM
It's hard to say what's a best or a worst case, it's essentially the first time I do this kind of experiment.
Anyway, from my first sets of data I can see a "typical case", which I paste here (sorry for the number of data points).

Thanks again,
robocop


NOTE from Easwar: I removed the pasted data because it was very long and made it hard to read thread...I have pasted image in the reply below that shows how the data looks.


quote:

Hi,

You mentioned that your data "drops quickly right after A2", so if the drop off is always sharp, it could be possible to write some code to detect where the drop-off occurs and put such code in "before script section" to limit the x range in the fit.

Perhaps you can paste one of your "best case" and "worst case" dataset x,y values here?

Easwar
OriginLab





Edited by - easwar on 02/14/2007 5:32:07 PM
easwar Posted - 02/13/2007 : 10:17:45 PM
Hi,

You mentioned that your data "drops quickly right after A2", so if the drop off is always sharp, it could be possible to write some code to detect where the drop-off occurs and put such code in "before script section" to limit the x range in the fit.

Perhaps you can paste one of your "best case" and "worst case" dataset x,y values here?

Easwar
OriginLab

larry_lan Posted - 02/13/2007 : 9:22:53 PM
I think you can only adjust your data after you get A2, so maybe you can use the "After Fit" scripts.

To simplify the problem, I supposed there are only one XY data in the worksheet Data1, after the fit, copy data to Data2 if Y <= A2 (That means cut the value if Y>A2). So use the following script in the "After Fit" box:

win -a data1;
rr = 1;
for(ii=1; ii<=wks.maxrows; ii++)
{
if(Data1_B[ii] <= A2)
{
Data2_A[rr] = Data1_A[ii];
Data2_B[rr] = Data1_B[ii];
rr++;
}
}

This is only an example, you can change the script as you need.

Larry
OriginLab Technical Services

Edited by - larry_lan on 02/13/2007 9:24:16 PM
robocop Posted - 02/13/2007 : 5:44:15 PM
Thanks for your reply Laurie.
A2 is not predictable at all, the experiment is likely to give 96 different values for it. It has to be calculated by the software, and the same is true for A1 too. At the end, I'm interested in the x0 values for each of the curves that have been reliably fitted.

robocop
Laurie Posted - 02/13/2007 : 4:51:40 PM
Best would be to select a range of data to fit to prior to opening the NLSF fitting tool, but of course you can only do this if you know the value of A2. Is A2 a fixed parameter or do you need the fitter to estimate this parameter value?

OriginLab Technical Support

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000