What is interpolate and pre-averaging

Dear Forum, 

So I have a noisy data set (wave1) and want to find it's first derivative, because according to this data, there is some slope change. I decided to use interpolate to average and smooth the data, but it gives me different options. So when I plot them on top of my original data, I am getting different results. It looks like the pre-averaged curve is very smooth and gives me a good 1st derivative plot. All the rest, are still noisy. At this point, I don't exactly understand the interpolate function do. 

I checked the manual all it says, "The main use for linear interpolation is to convert an XY pair of waves into a single wave containing Y values at evenly spaced X values so that you can use Igor operations, like FFT, which require evenly spaced data."  

and pre-averaging is another function, good for noisy data that was added to interpolate later.

What does exactly interpolate and pre-averaging do? If possible explain with example and provide the mathematical formulation

 

thank you
 

wave1

Suppose that you have an unevenly spaced data set as below

x 0, 1, 3, 4, 5, 7, 8, 10
y 0, 1.1, 2.9, 4.1, 4.9, 6.8, 7.9, 10.1

The interpolate operation will convert the data into the set below.

xi 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
yi 0, 1.1, .., 2.9, .., 4.1, .., 4.9, .. 6.8, 7.9, .., 10.1

The values .. will be INTERPOLATED (linearly) between the two opposing values.

When you have this evenly spaced data set, you can continue with only the yi wave and set its scaling to start at 0 with a step of 1. A scaled wave removes the need to have the x or xi waves.

It sounds like you want the Smooth command instead of Interpolate.

From the help file: "The Smooth operation smooths the named waves using binomial (Gaussian) smoothing, boxcar (sliding average) smoothing, Savitzky-Golay (polynomial) smoothing, or running-median filtering."

An extreme version would be to fit your data and differentiate the fit instead of the raw data.

The help topic "The Interpolate2 Operation" says:

The Interpolate2 operation has a feature called "pre-averaging" which can be used when you have a large number of input points. Pre-averaging was added to Interpolate2 as a way to put a cubic spline through a large, noisy data set before it supported the smoothing spline. We now recommend that you try the smoothing spline instead of pre-averaging.