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

points—A (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_x—The x dimension of the grid. The x values are scaled to fit this dimension.

grid_y—The y dimension of the grid. The y values are scaled to fit this dimension.

grid_z—The z dimension of the grid. The z values are scaled to fit this dimension.

Returned Value

result—A gridded, 3D array containing intensity values.

Keywords

Iter—The 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.

Nghbr—The 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_Avg—Normally, 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.

XMax—The 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.

XMin—The 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.

YMax—The 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.

YMin—The 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.

ZMax—The 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.

ZMin—The 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