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 for Programming
 LabTalk Forum
 Raw Data Processing

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
tomst Posted - 07/09/2018 : 05:38:13 AM
Origin Ver.2015G and Service Release 1
Operating System: Windows 7

Hello!
I wanted to automate my analysis of lab data.
Until now I was able to load the “raw data” stored in ‘*.txt’ files out of different named folders. Also it is possible to name the worksheets corresponding to the file names, as well as to extract the unit and long name information out of the header.
For the further steps I don’t know exactly how to proceed. The raw data contain measurement data of 3 separate measurement cycles in one *.txt file. At first I want to copy the different cycle-data into new worksheets named “original_worksheet_name_c1” (2,3).

Using the code

Loop (izn, 1, 3)
range zn=3; // Define range using some of the columns, 3 points to 3rd column
type "Number of rows in raw data sheet= $(zn.GetSize())";
string strCond$="zn = izn"; // Define a condition string and extract data to a new named sheet in the same book
wxt test:=strCond$ ow:="Zyklus izn"! num:=nExtRows;
type "Number of rows extracted = $(nExtRows)";


I was able to extract the range of cycle 1 (Zyklus izn).
With the “loop” command origin analyzes three worksheets, but I suppose no. 2 and 3 aren’t the orginial one.
Now I don’t know how to put the extraction process into the loop properly and how to rename it.
For further processing I guess that I could use the “doc –e” command?
Can you help me?
Thank you in advance!
3   L A T E S T    R E P L I E S    (Newest First)
yuki_wu Posted - 07/11/2018 : 02:35:11 AM
Hi,

If you think wxt function is useful, you could activate the worksheet first by:
page.active = 2; // Active worksheet by index
page.active$ = sheet3;   // Active worksheet by name

More info about how to activate a worksheet could be found in this page:
https://www.originlab.com/doc/LabTalk/guide/Worksheet-Basic-Operation#Activate_a_Worksheet

If you still have any questions, please send your file with detailed description to us via tech@originlab.com with the subject line “Attn: Yuki”

Regards,
Yuki

OriginLab
tomst Posted - 07/10/2018 : 09:41:52 AM
Hi,

not exactly. The last row contains a condition to determine which cycle is analysed. There are three cycles summarized in one worksheet. The data of this three cycles in one sheet should be split into three sheets containing the data of one cycle each.
So, I want to split the whole worksheet (all columns) into three worksheets.
Unfortunately the wxt function seems to use only the active sheet and not the original one.
I could attach a exmaple file if this is useful.
yuki_wu Posted - 07/09/2018 : 10:04:18 PM
Hi,

If I don’t misunderstand your question, I suppose you want to split the column into multiple worksheet by row, right?

If so, I think you could try the colsplit X-Function:
https://www.originlab.com/doc/X-Function/ref/colsplit

Regards,
Yuki

OriginLab

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