2D interpolation of unevenly spaced data

Hello everyone!

I have few waves representing the conductivity of a sample at different temperatures (i.e. 10K, 50K, 70K etc). I made a matrix of z values using these waves and my goal is to do an interpolation to get a nice 2D plot. While the scale on for the x axis is evenly spaced (is the frequency in my case) the y axis , the temperature, is unevenly spaced (I have something like 10K, 20K, 40K, 70K, 100K, 200K, 295K).

This is not a problem for a 2Dplot as I can use the appropriate waves to append the interpolated image on a graph. The real problem is the following:

I have 4 different set of similar data that I would like to plot in a 3D-plot (as z planes).  3D gizmos use the wave scaling to draw the axes so i need to set the scale of my 3D wave using the set SetScale command. In this way is just possible to set a linear-evenly spaced scale while my y axis in unevenly spaced.

I've tried to use the ImageInterpolate function with the XYWaves method but since it needs XY waves 1 point longer than your initial waves it mess up my data since I have just 7 points for the Y axis.

Do you have any advice?

Hello Matteo,

One approach is for you to convert your data into a triplet wave and then use ImageInterpolate with the Voronoi keyword.  This approach requires the least amount of work on your part.  Otherwise, you could run the interpolation yourself using the knowledge that you have one axis that is linear so you are only interpolating in the y-direction.

To use ImageInterpolate with the XYWaves you really need the extra point in each wave because the assumption is that your pixels are finite and rectangular and so you are required to provide the left and right values for each.  This may be easy in the case of your x-axis (use half the distance between pixels) but you may have to consider what that means in the case of your y-axis.

I hope this helps,

 

A.G.

WaveMetrics, Inc.