How to properly interpolate a Date/Time 1D wave?
Jakub
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?
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:
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
August 15, 2017 at 09:22 am - Permalink
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
August 16, 2017 at 01:14 am - Permalink
newwave = originalwave[p/7]
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
August 16, 2017 at 09:20 am - Permalink
resample/UP=7/N=3/WINF=None Time_v
This results in linear interpolation.
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
August 16, 2017 at 01:42 pm - Permalink
August 17, 2017 at 05:13 am - Permalink
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
August 17, 2017 at 09:29 am - Permalink