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
 How import multiple headerlines from asciifile?

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
a_user Posted - 08/14/1998 : 12:50:00 PM
I'm currently programming a script to import data from
an ascii-file. This file contains multiple headerlines
(about 25) with important information that would be
very interesting to extract from the file (the data format
of the ascii-file is "JEOL-DX" from af Tandem Mass Spectrometer)
and plottet on the resulting graph.

My question is: Can this be done in a script? Alternativly
can this be done at all (e.g. via a template)?

Example ascii-file:

##TITLE=Mass Profile Spectrum of 9901-45 + 46
##JEOL-DX 2.00

##SAMPLE NAME= 3-methyl-2-butanol-1,1,1-d3
##NPOINTS= 1245
##DATA=
44.5016 159705
44.5030 158809

##END=

Thanks in advance
Henrik

1   L A T E S T    R E P L I E S    (Newest First)
a_user Posted - 08/14/1998 : 12:52:00 PM
Re: How to import multiple headerlines from asciifile?

I wrote:
> I'm currently programming a script to import data from
> an ascii-file. This file contains multiple headerlines
> (about 25) with important information that would be
> very interesting to extract from the file (the data format
> of the ascii-file is "JEOL-DX" from af Tandem Mass Spectrometer)
> and plottet on the resulting graph.
>
> My question is: Can this be done in a script? Alternativly
> can this be done at all (e.g. via a template)?

And the answer is, yes! All information in the imported ascii-file
which is not in two columns, is stored in the system-variable %Z.

This can without problems be manipulated (e.g. extract lines).

An example: label -p 60 (-8) -s Measured %[%[%Z,@6],>'='];
Gives all text to the right of "=" in line number 6 of the header.

And maybe more interessting. I can place the entire header in the script-
window. This way you don't HAVE to read all header infomation, but you
don't loose it.

Like this: type -a %Z;

> Example ascii-file:
>
> ##TITLE=Mass Profile Spectrum of 9901-45 + 46
> ##JEOL-DX 2.00
>
> ##SAMPLE NAME= 3-methyl-2-butanol-1,1,1-d3
> ##NPOINTS= 1245
> ##DATA=
> 44.5016 159705
> 44.5030 158809

> ##END=

I hope others can use this information. BTW, Origin Tech Support
couldn't tell me this when I asked...

Henrik

(script avaliable upon request - henrik@kiku.dk)


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