The MIN_CURVE_SURF function interpolates a regularly- or irregularly-gridded set of points with either a minimum curvature surface or a thin-plate- spline surface. It returns a two-dimensional floating-point array containing the interpolated surface, sampled at the grid points.
A minimum curvature spline surface is fitted to the data points described by x , y , and z . The basis function is:
C ( x 0 , x 1 , y 0 , y 1 ) = d 2 log( dk )
where d is the distance between ( x 0 , y 0 ), ( x 1 , y 1 ) and k = 1 for minimum curvature surface or k = 2 for Thin Plate Splines. For n data points, a system of n +3 simultaneous equations are solved for the coefficients of the surface. For any interpolation point, the interpolated value is:
This routine is written in the IDL language. Its source code can be found in the file
subdirectory of the IDL distribution.
Arrays containing the Z , X , and Y coordinates of the data points on the surface. Points need not be regularly gridded. For regularly gridded input data, X and Y are not used: the grid spacing is specified via the XGRID and YGRID (or XVALUES and YVALUES) keywords, and Z must be a two dimensional array. For irregular grids, all three parameters must be present and have the same number of elements.
If set, the Z parameter is a two-dimensional array of dimensions ( n,m ), containing measurements over a regular grid. If any of XGRID, YGRID, XVALUES, or YVALUES are specified, REGULAR is implied. REGULAR is also implied if there is only one parameter, Z . If REGULAR is set, and no grid specifications are present, the grid is set to (0, 1, 2, ...).
The output grid spacing. If present, GS must be a two-element vector [ xs, ys ], where xs is the horizontal spacing between grid points and ys is the vertical spacing. The default is based on the extents of x and y . If the grid starts at x value xmin and ends at xmax , then the default horizontal spacing is ( xmax - xmin )/(NX-1). ys is computed in the same way. The default grid size, if neither NX or NY are specified, is 26 by 26.
If present, BOUNDS must be a four-element array containing the grid limits in x and y of the output grid: [ xmin, ymin, xmax, ymax ]. If not specified, the grid limits are set to the extent of x and y .
Use the XOUT keyword to specify a vector containing the output grid x values. If this parameter is supplied, GS, BOUNDS, and NX are ignored for the x output grid. XOUT allows you to specify irregularly-spaced output grids.
Use the YOUT keyword to specify a vector containing the output grid y values. If this parameter is supplied, GS, BOUNDS, and NY are ignored for the y output grid. YOUT allows you to specify irregularly-spaced output grids.
Use the XPOUT and YPOUT keywords to specify arrays that contain the x and y values for the output points. If these keywords are used, the output grid need not be regular, and all other output grid parameters are ignored. XPOUT and YPOUT must have the same number of points, which is also the number of points returned in the result.