Institut für Astronomie und AstrophysikAbteilung AstronomieWaldhäuser Str. 64, D-72076 Tübingen, Germany |
RINTER
Cubic interpolation of an image at a set of reference points.
This interpolation program is equivalent to using the intrinsic INTERPOLATE() function in IDL V5.0 or later with CUBIC = -0.5. However, RINTER() has two advantages: (1) one can optionally obtain the X and Y derivatives at the reference points, and (2) if repeated interpolation is to be applied to an array, then some values can be pre-computed and stored in Common. RINTER() was originally for use with the DAOPHOT procedures, but can also be used for general cubic interpolation.
Z = RINTER( P, X, Y, [ DFDX, DFDY ] ) or Z = RINTER(P, /INIT)
P - Two dimensional data array, X - Either an N element vector or an N x M element array, containing X subscripts where cubic interpolation is desired. Y - Either an N element vector or an N x M element array, containing Y subscripts where cubic interpolation is desired.
Z - Result = interpolated vector or array. If X and Y are vectors, then so is Z, but if X and Y are arrays then Z will be also. If P is DOUBLE precision, then so is Z, otherwise Z is REAL.
DFDX - Vector or Array, (same size and type as Z), containing the derivatives with respect to X DFDY - Array containing derivatives with respect to Y
/INIT - Perform computations associated only with the input array (i.e. not with X and Y) and store in common. This can save time if repeated calls to RINTER are made using the same array.
suppose P is a 256 x 256 element array and X = FINDGEN(50)/2. + 100. and Y = X. Then Z will be a 50 element array, containing the cubic interpolated points.
can be time consuming.
Interpolation is not possible at positions outside the range of the array (including all negative subscripts), or within 2 pixel units of the edge. No error message is given but values of the output array are meaningless at these positions.
invokes CUBIC interpolation algorithm to evaluate each element in Z at virtual coordinates contained in X and Y with the data in P.
If repeated interpolation of the same array is to occur, then one can save time by initializing the common block RINTER.
March 1988 written W. Landsman STX Co. Checked for IDL Version 2, J. Isensee, September, 1990 Corrected call to HISTOGRAM, W. Landsman November 1990 Converted to IDL V5.0 W. Landsman September 1997 Fix output derivatives for 2-d inputs, added /INIT W. Landsman May 2000
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]