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
 Data manipulation during import

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
J.Stellmacher Posted - 02/22/2016 : 10:04:57 AM
Hi,
I imagine that I can't be the first one who wants to do this but neither google nor the forum-search was of any help.

So, basically I want to import some data of the form intensity over time. Unfortunately my time column is saved as bin#, so I need to multiply these values with the time width of my bins to get the actual time and I want this to be done automatically during the import. Afaik Origins import wizard doesn't allow me to multiply any column with a constant value but it enables me to run a script so I guess I need to write a script for that? I have next to zero experience with writing and executing scripts in origin. I tried to run simple "hello world" script during import but failed.
Instructions for my problem would be greatly appreciated!
regards
2   L A T E S T    R E P L I E S    (Newest First)
J.Stellmacher Posted - 02/23/2016 : 05:28:36 AM
Thanks a lot! The "Script after each file import" was the part I was looking for. I just didn't assumed it to be in the advance option :)
snowli Posted - 02/22/2016 : 2:36:15 PM
Hello,

As you observed, to modify imported data's values, you have to use Script after import. We also supported "Script after each file import" and all files imported in more file types in Origin 2016.


E.g. col(A)=col(A)*20; //column A will be multiplid by 20

Import wizard also allows extracting varabiels file name or header. So if such constant was stored in file name or header and changes based on data file, you can extract it and use in the Script after import as well.

We support labtalk script.
e.g.
type "hello world"; //dump hello world in Script window.

This is a good place to start learning Labtalk.
http://originlab.com/doc/labtalk

Thanks, Snow

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