How to properly interpolate a Date/Time 1D wave?

Dear All,

I'm trying to solve this problem for quite some time now.

I have a 2Dwave that is a result of interpolation of the source matrix using this command:

ImageInterpolate/F={7,7} Bilinear, Matrix0

Resulting matrix obviously does not fit the Date/Time Wave that was originally used for X axis values on the Image graph. The Wave itself is monotonically increasing but there are gaps in times in it.

I have tried to interpolate the Date/Time wave using:

 resample/UP=7/N=41 Time_v

The resulting Wave matches the interpolated matrix in number of rows, it loses its monotonic nature though...After re-sampling it looks like on the attached file. It acquires strange oscillations on the edges of gaps.

How can I interpolate such a wave to match the ImageInterpolate output and retain a monotonic nature?

The ringing looks like what happens when certain types of interpolation are used to interpolate a step function.

Be sure that the date/time wave is double precision.

The Resample operation may be overkill for what you want. You might do something like:
Make/D/O/N=(7*numpnts(originalwave)) newwave
newwave = originalwave[p/7]

This uses Igor's automatic interpolation on the right-hand side.

You might also consider abandoning the X wave and instead set the X scaling of your interpolated matrix to the required time values.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Thank you for your answer.

There is a small problem with that code. It adds 7 extra points at the end of the interpolated wave. Is there a way to avoid it?

What do you mean by
Quote:
set the X scaling of your interpolated matrix to the required time values
Maybe six extra points? I see that it produces 7 points for the last point in originalWave, but should make just one point, the last one. How about:

Make/D/O/N=(7*numpnts(originalwave) - 6) newwave
newwave = originalwave[p/7]



John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Try:

 resample/UP=7/N=3/WINF=None Time_v

This results in linear interpolation.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
Thank you both! Jim, your solution is simpler :) Big help as always! :)