Reference Guide > F Routines > FAST_GRID4 Function
  

FAST_GRID4 Function
Returns a gridded, 3D array containing intensity values, given random 4D coordinates (this function works best with dense data points).
Usage
result = FAST_GRID4(points, grid_x, grid_y, grid_z)
Input Parameters
pointsA (4, n) array containing the random 4D points to be gridded. Typically, points(0, *) contains the x values, points(1, *) contains the y values, points(2, *) contains the z values, and points(3, *) contains the intensity values. (You may, however, choose to put other variables in these four vectors.)
grid_xThe x dimension of the grid. The x values are scaled to fit this dimension.
grid_yThe y dimension of the grid. The y values are scaled to fit this dimension.
grid_zThe z dimension of the grid. The z values are scaled to fit this dimension.
Returned Value
resultA gridded, 3D array containing intensity values.
Keywords
IterThe number of iterations on the smooth function. The execution time increases linearly with the number of iterations. The default is 3, but any non-negative integer (including zero) may be specified.
NghbrThe size of the neighborhood to smooth. If not supplied, the neighborhood size is calculated from the distribution of the points. The amount of memory required increases by the square of the neighborhood size.
No_AvgNormally, if multiple data points fall in the same cell in the gridded array, then the value of that cell is the average value of all the data points that fall in that cell.
If the No_Avg keyword is present and nonzero, however, the value of the cell in the gridded array is the total of all the points that fall in that cell.
XMaxThe x-coordinate of the right edge of the grid. If omitted, maps the maximum x value found in the points(0, *) array to the right edge of the grid.
XMinThe x-coordinate of the left edge of the grid. If omitted, maps the minimum x value found in the points(0, *) array to the left edge of the grid.
YMaxThe y-coordinate of the top edge of the grid. If omitted, maps the maximum y value found in the points(1, *) array to the top edge of the grid.
YMinThe y-coordinate of the bottom edge of the grid. If omitted, maps the minimum y value found in the points(1, *) array to the bottom edge of the grid.
ZMaxThe z-coordinate of the front edge of the grid. If omitted, maps the maximum z value found in the points(2, *) array to the front edge of the grid.
ZMinThe z-coordinate of the back edge of the grid. If omitted, maps the minimum z value found in the points(2, *) array to the back edge of the grid.
Discussion
FAST_GRID4 uses a neighborhood smoothing technique to interpolate missing data values for 4D gridding. The gridded array returned by FAST_GRID4 is suitable for use with the SHADE_VOLUME and VOL_REND functions.
FAST_GRID4 is similar to GRID_4D. FAST_GRID4, however, works best with dense data points (more than 1000 points to be gridded) and is considerably faster, but slightly less accurate, than GRID_4D. (GRID_4D works best with sparse data points and is stable when extrapolating into large void areas.)
 
note
For best results, use a small neighborhood (such as 3) and a large number of iterations (more than 16).
Examples
See the Examples section in the description of the CENTER_VIEW routine.
See Also
FAST_GRID3, GRID_2D, GRID_3D, GRID_4D, GRIDN, GRID_SPHERE
 
note
For information on the optional software package for advanced gridding, PV‑WAVE:GTGRID, contact your Rogue Wave account representative.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.