Interpolate2
Interpolate2 [flags ] [ xWave , ] yWave
The Interpolate2 operation performs linear, cubic spline and smoothing cubic spline interpolation on 1D waveform or XY data. It produces output in the form of a waveform or an XY pair.
The cubic spline interpolation is based on a routine from "Numerical Recipes in C".
The smoothing spline is based on "Smoothing by Spline Functions", Christian H. Reinsch, Numerische Mathematic 10, 177-183 (1967).
For background information, see The Interpolate2 Operation.
Parameters
xWave specifies the wave which supplies the X coordinates for the input curve. If you omit it, X coordinates are taken from the X values of yWave.
yWave specifies the wave which supplies the Y coordinates for the input curve.
Flags
| /A=a | Controls pre-averaging. Pre-averaging is deprecated - use the smoothing spline (/T=3) instead. | ||||||||||
| If a is zero, Interpolate2 does no pre-averaging. If a is greater than one, it specifies the number of nodes through which you want the output curve to go. Interpolate2 creates the nodes by averaging the raw input data. | |||||||||||
| Pre-averaging does not work correctly with the log-spaced output mode (/I=2). This is because the pre-averaging is done on linearly-spaced intervals but the input data is log-spaced. | |||||||||||
| /E=e | Controls how the end points are determined for cubic spline interpolation only. | ||||||||||
| |||||||||||
| /F=f | f is the smoothing factor used for the smoothing spline. | ||||||||||
| f =0 is nearly identical to the cubic spline. | |||||||||||
| f >0 gives increasing amounts of smoothing as f increases. | |||||||||||
| See Smoothing Spline Parameters for details. | |||||||||||
| /FREE | Creates output waves as free waves (see Free Waves). | ||||||||||
| /FREE is allowed only in functions. If you use /FREE then the output waves specified by /X and /Y must be either simple names or valid wave references. | |||||||||||
| /FREE was added in Igor Pro 9.00. | |||||||||||
| /I[=i] | Determines at what X coordinates the interpolation is done. | ||||||||||
| |||||||||||
| If you omit /X=xDest then the X coordinates come from the X values of the output waveform designated by /Y=yDest . | |||||||||||
| If you include /X=xDest then the X coordinates come from the data values of the specified X output wave. | |||||||||||
| When using /I=3, the number of output points is determined by the destination wave and the /N flag is ignored. | |||||||||||
| See Destination X Coordinates from Destination Wave for further details. | |||||||||||
| /J=j | Controls the use of end nodes with pre-averaging (/A). Pre-averaging is deprecated - use the smoothing spline (/T=3) instead. | ||||||||||
| |||||||||||
| /N=n | Controls the number of points in the output wave or waves. n defaults to the larger of 200 and the number of points in the source waves. This value is ignored if you /I=3 (X from dest mode). | ||||||||||
| /S=s | s is the estimated standard deviation of the noise of the Y data. It is used for the smoothing spline only. s is used as the estimated standard deviation for all points in the Y data. | ||||||||||
| If neither /S nor /SWAV are present, Interpolate2 arbitrarily assumes an s equal to .05 times the amplitude of the Y data. | |||||||||||
| /SWAV=stdDevWave | stdDevWave is a wave containing the standard deviation of the noise of the Y data on a point-by-point basis. It is used for the smoothing spline only. stdDevWave must have the same number of points as the Y data wave. | ||||||||||
| If neither /S nor /SWAV are present, Interpolate2 arbitrarily assumes an s equal to .05 times the amplitude of the Y data. | |||||||||||
| /T=t | Controls the type of interpolation performed. | ||||||||||
| |||||||||||
| /X=xDest | Specifies the X destination wave name. | ||||||||||
| If /X is present the output is an XY pair. | |||||||||||
| If /X is omitted the output is a waveform. | |||||||||||
| The X destination wave may or may not exist when Interpolate2 is called except for "X from dest" mode (/I=3) when it must exist. Interpolate2 overwrites it if it exists. | |||||||||||
| /Y=yDest | Specifies the Y destination wave name. | ||||||||||
| If you omit /Y, a default wave name is generated. The name of the default wave is the name of the source Y wave plus "_L" for linear interpolation, "_CS" for cubic spline or "_SS" for smoothing spline. | |||||||||||
| The Y destination wave may or may not exist when Interpolate2 is called. Interpolate2 overwrites it if it exists. | |||||||||||
See Also
Demos
References
"Numerical Recipes in C " for cubic spline.
"Smoothing by Spline Functions", Christian H. Reinsch, Numerische Mathematic 10, 177-183 (1967).