>  Docs Center  >  Libraries  >  ASTROLIB  >  RINTER
Libraries

RINTER

RINTER

Name


      RINTER

Purpose


      Cubic interpolation of an image at a set of reference points.

Explanation


      This interpolation program is equivalent to using the intrinsic
      INTERPOLATE() function 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.

Calling Sequence


      Z = RINTER( P, X, Y, [ DFDX, DFDY ] )
              or
      Z = RINTER(P, /INIT)

Inputs


      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.

Output


      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.

Optional Output


      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

Optional Keyword Input


    /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.
       

Example


      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.

Side Effects


      can be time consuming.

Restriction


      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.

Procedure


      invokes CUBIC interpolation algorithm to evaluate each element
      in Z at virtual coordinates contained in X and Y with the data
      in P.

Common Blocks


      If repeated interpolation of the same array is to occur, then
      one can save time by initializing the common block RINTER.

Revision History


      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
     



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us