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
 Quick Fit - Labtalk

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
vart3 Posted - 04/15/2016 : 6:36:26 PM
Origin Ver. and Service Release (Select Help-->About Origin): Origin 9.1 (64 Bits)
Operating System: Windows

I need to do a linear fit for several curves. I am using the quick fit gadget for this. The fit is done for the closest three points around the origin of the plot, but since the sampling is different for each curve, the sizes of the ROIs in each curve needs to be different to select only these three points in each curve.

I tried to merge all the curves after including the ROI in each independent plot window with the specific size to pick three points around the origin of the plot. The previously established ROIs and their sizes for each plot seems to be conserved in the new merged plot window. To take advantage of the batch processing I am using the "new output for all layers (L)" option. For this, I need to select the play button of one of the ROIs and it seems OriginPro is taking the size of ROI associated with the button I selected to fit all the curves, and not the independent ROIs as I am intending to do.

As I could not make by using this graphical approach, I wrote a script for this and I executed it in the Command Window with no success so far. The code I am using for this is shown as follows,


doc -ef LB


{


gadget gg = rect; //declare LT gadget variable
gg.output();


}


The fit is done for the the first plot but it stops after this and I getting an error saying:

GG:failed to add variable to local stack!

I would appreciate to read any advice you might have to take advantage at least partially (as I had to select the size of the ROI for each plot, in one-by-one manner) of the batch processing in this described scenario.

Thanks in advance for your answer.
1   L A T E S T    R E P L I E S    (Newest First)
Liamn Posted - 04/17/2016 : 10:52:32 PM
Hi, I think you need to change "doc -ef LB" to "doc -e LW" in your script.

By the way, you can also use the "Regional data selector" tool to select your ROI for each plot, and then use Linear Fit tool to perform fitting:
1. Plot all of your data into one graph.
2. Go to Data menu, you can see all data sets are listed in the end of the menu.
3. Make sure the 1st data set is selected (there is a tick mark in front), select the Regional data selector tool (the 7th button on Tools toolbar), drag a rectangle to include your 3 points around the origin. You can see 2 red vertical lines are added to the graph - you can double click on one of the lines to make further adjustments.
4. Go to Data menu and select your 2nd data set, and do step 3.
5. Repeat 3 and 4 to select all data sets.
6. Go to Analysis menu, select Fitting: Linear Fit to open dialog. Expand the Input Data branch to make sure all of your data sets are correctly selected. Click OK to perform fitting on all selected ranges.

I hope this works for you.

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