ImageInterpolate Bug? Help

Hi Everyone,

I was following this node as this Igor user was doing something similar to what I was doing.

http://www.igorexchange.com/node/2366

I type this into the command line
ImageInterpolate/S={xmin, dx, xmax, ymin,dy,ymax} voronoi tripletWave


and I get an error. (Incidentily the same error as the Fortress from the old thread "Use '/N=number' or '/N=(expression)' (assuming flag 'N'). If multiple dimensions used (i.e., Make/N), use /N=(n1,n2...)")

I tried putting the S parameters in parenthesis as hrodstein suggested but still isn't working. If anyone can help me that would be wonderful!

Thanks for any help =)

Best,
N

PS i'm using Igor Pro 6.37 on Windows 7
Since you are typing on the command line, all of the variables must be globals.

Print them out with:

Print xmin, dx, xmax, ymin,dy,ymax


That should tell you if the variables are actually defined globally (as would the Data Browser).

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
Thanks for your reply Jim,

I was under the impression that only Global variables show up on the data browser? (that's why when I write a new function I have everything as a global variable for debugging purposes).

I printed them and they all showed up.

Is it because they are global variables that I am having a problem?

I wrote a simple function with the command and I think it worked, well i got an image (but it looks a bit odd but that might be my data). But I would really like to know why it isn't working on the command line. Any ideas?

Thanks,
N
In Addition to this,

I have been looking at the 2D wave ImageInterpolate produces and I'm not entirely sure it's done what I was hoping it would do.

The Z values don't appear to be matched up with the x and y coordinates very well. There seems to be gaps in the table. Is there a better way to do this?

Thanks,

N
n.black wrote:

I have been looking at the 2D wave ImageInterpolate produces and I'm not entirely sure it's done what I was hoping it would do.


Please elaborate; we have no idea what you were hoping.

Quote:

The Z values don't appear to be matched up with the x and y coordinates very well. There seems to be gaps in the table. Is there a better way to do this?


I'm not sure what "table" you have in mind.

If you have a triplet wave and the interpolated image you can display them both in Gizmo. First display the triplet wave as a scatter object and then append the image as a surface. You can find example of this in the video tutorials http://www.wavemetrics.com/products/igorpro/videotutorials.htm.

You might also want to try ImageFromXYZ.

A.G.
WaveMetrics, Inc.
Thanks for the reply A.G.

Let me elaborate I was hoping to turn my three 1D waves X,Y,Z where the X and Y waves are location waves of the Z wave (eg intensity) thus making a 2D matrix of z values that have been appropriately placed. I ultimately want to make a 2D image plot of this z matrix. (The X,Y waves are locations on a square grid).

I already watched the video tutorial (and the 3D image help guide), which was why I decided to try and achieve my goal this that way. I understand that for some data calculation reason there might be gaps around the edges of the table of the 2D z matrix data at least in the tutorial example, but my data should match up nicely. Moreover, when i tried to find pt (0,0,0) on the table the first data value of my z wave wasn't there. I'm not very efficient at code writing (in every sense of the word efficient unfortunately) so I was hoping that IGOR had a built in function which would saving me time.

But I'll try the image form XYZ approach and see where I get for the time being! =)

Thanks for your help,

N
n.black wrote:
I ultimately want to make a 2D image plot of this z matrix. (The X,Y waves are locations on a square grid).


If the data are already sampled on a rectangular grid it is counter productive to use ImageInterpolate Voronoi. Instead, check if you can rearrange the data, for example, if the data were sampled in order you could use:
 Redimension/N=(rows,cols) datawave

If the data are not sampled in order then I'd recommend either sorting or using ImageFromXYZ.
Thanks Igor,

Sorry for late reply, but your advice really solved my problem.
Unfortunately my data was all "higgilty piggilty" which was why I was over complicating matters.

Thanks for all your help!

Best wishes,
N