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
 Batch import and interpolate (Origin Pro 8.5)

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
amay60 Posted - 08/02/2011 : 6:02:01 PM
I have been using the import wizard (Origin Pro 8.5) to pull x and y columns of data from many ascii files. This works fine but I would like to automatically interpolate the data to make my data processing life easier. So I searched the help and forums then went to advanced options of the import wizard and put down several permutations of:

loop(n, 1,2){interp1xy iy:=Col(n) method:=spline npts:=1000 xmin:=30.2 xmax:=200};

This did not work. I would greatly appreciate any suggestions for getting this to work. Also I am not married to this approach, my ultimate goal is a spreadsheet full of evenly spaced y-axis data imported from many different files.
5   L A T E S T    R E P L I E S    (Newest First)
Sam Fang Posted - 08/04/2011 : 11:43:24 PM
Thanks for your sample data.

I have replied in the email.

Thanks.

Sam
OriginLab Technical Services
amay60 Posted - 08/04/2011 : 1:05:25 PM
Sam, I have "run script after each file imported" selected and "Start New Columns" is selected as the Import Mode. Each ascii file has 4 columns but I am only importing the middle two, one x and one y.

I believe that Origin is considering column 2 as being from the Origin sheet and not the importing file (note that if I put iy:=Col(3) I get an error message on the first import and then it repeatedly interpolates Origin column 3).

I have sent three sample files via the web form. Thank you again for your time.
Sam Fang Posted - 08/03/2011 : 11:11:16 PM
Did each ASCII data file contains only two columns, and you choose "Start New Columns" as Import Mode in Source page?

You can select "run script after each file imported" in Advanced Options, it will loop and interpolate each imported file's column 2 automatically.

If I misunderstood your request, you can send a data file to us, and describe which columns to be interpolated.

To upload a file, click Send File to Tech support button in the forum's top right.

Thanks.

Sam
OriginLab Technical Services
amay60 Posted - 08/03/2011 : 12:34:32 PM
Sam, thank you for your reply. When using the script you gave me interpolated values of column 2 are placed after each data set. So that my spreadsheet looks like this:

X1 Y1 Interp1 X2 Y2 Interp1 X3 Y3 Interp1

I need it to interpolate the subsequent imports not just column 2. That is why I was trying to put it in a loop so that the iy:=Col(2) would change and interpolate the new data.
Sam Fang Posted - 08/03/2011 : 04:01:32 AM
X-Function interp1xy is used to generate interpolated Y data with specified uniformly-spaced X values. You can specify script in advanced options.

interp1xy iy:=Col(2) method:=spline npts:=1000 xmin:=30.2 xmax:=200 oy:=(<new>,<new>);


It will produce evenly spaced x values and interpolated Y values from x values.

Sam
OriginLab Technical Services

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