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
 Several questions related to extracting the header

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
circumvent Posted - 06/06/2007 : 6:12:23 PM
Origin Version (Select Help-->About Origin): 7.5
Operating System: Win XP


Either labtalk or origin C suggestions will help.


For most of the data acquired from the experiment, they contain some headers, for example,

*****
*Temperature 4 K
*Magnetic field 3 T
Freq amp
12, 56
14, 65
¡­¡­

Now, I am thinking of extract the header+file name information from the file. My questions are as follows:

1, How does Origin define headers when it imports the data? What¡¯s the rules that Origin change the worksheet name and column¡¯s name? When I use the command open -w %A, the worksheet name will be changed to something related to file name, and the column¡¯s name will become something related to the header. Some of the header¡¯s information will also go to the column label part. What are the rules here?

2, How to escape the first few lines when importing the data? If I know exact n lines to escape, what¡¯s the command? More generally, if I don¡¯t know the exact lines, how to justify which line is data, which line is not?

3, Sometimes ORIGIN will make wrong decision, especially when the line starts with numbers, for example

334 lines 557
Freq amp
12, 56
14, 65

ORIGIN will consider the first line as the start of the dataset and put everything into one column. How to solve these problems?


Thanks for your help,

Jinbo
2   L A T E S T    R E P L I E S    (Newest First)
circumvent Posted - 06/07/2007 : 08:55:30 AM
Thanks for Deanna's good suggestions
Deanna Posted - 06/06/2007 : 10:32:32 PM
Hi Jinbo,

"Open -w %a" command is only suitable for importing simple ASCII files. It is somewhat like clicking the Import ASCII button on the Standard toolbar. The import settings saved in the worksheet is used to do the importing.

In your case, the ASCII files are a little bit complicated. Maybe you can consider using import filters. Probably this article in our K-base will help:
http://www.originlab.com/www/support/resultstech.aspx?ID=1105&language=English&Version=7.5

Deanna
OriginLab Technical Services

Edited by - Deanna on 06/06/2007 10:34:14 PM

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