GEOMETRY commands


PROGRAM NAME

ggridder2d - Compute z=f(x,y) over a user-defined grid given scatter data.

DESCRIPTION

kgridder_2d is used to fit a surface through scatter data. Input to this module consists of a set of points, and output consists of a 2D array of function values. A choice of several numerical methods are provided, each yielding a possibly different surface.

At present, the methods available are as follows.

Fourier Analysis (default) The input data is assumed to be an sampled set of points from a function which can be reconstructed using 2D fourier analysis. Given the input values, the frequency components of the estimated function are computed. The values at each output grid point are computed using this function.

Inverse Distance Method At each output grid point, all points that lie within a user-defined search radius are averaged together using an inverse distance formula. The user is provided with an exponent which is applied to the denomimator of this forumula. Increasing the value of the exponent will tend to cause points farther away to have less influence. Decreasing the value of the exponent will tend to make the surface a bit smoother.

Common problems:

Search Radius Too Small The search radius must be large enough so as to have some overlap with adjacent output grid points, and large enough to include input data. In areas of sparse input data, often the output grid will have it's value set to "UNDEFINED", as no input points are close enough to influence this grid point. The two ways to work around this are to use a larger search radius (the radius is in the same space as the input data, by the way), or to use a different method which works better with sparse data, such as Fourier Analysis.

Results of Fourier Analysis too Extreme On occasion, this method will produce values which vary wildly from the input, resulting in surfaces which have marked peaks or valleys, seemingly going off into infinity. This is produced by extrapolation into a region where there is no data, based upon a partial derivative computed at two data points close together. The only way to work around this is to include more points in the surface computation, or to use a method which doesn't use partial derivatives, such as the Inverse Distance Method.

COMING SOON: Bivariate Analysis (Fall 1994)

The extents of the output grid, by default, are computed for you. If this isn't acceptable, then set the min/max values for the grid yourself.

REQUIRED ARGUMENTS

-i
type: infile
desc: input data object
-o
type: outfile
desc: output data object

OPTIONAL ARGUMENTS

-grid_size_x
type: integer
desc: value indicating x-resolution of output grid
default: 20
bounds: value > 0
-grid_size_y
type: integer
desc: value indicating y-resolution of output grid
default: 20
bounds: value > 0

Mutually Exclusive Group; if desired, specify ONE of:

ALL OF the Mutually Inclusive Group:

-inverse_distance_method
type: flag
desc: use inverse-distance method
AND
-inverse_distance_radius
type: double
desc: user-defined radius, inside which points will be averaged
default: 1
bounds: value > 0.0
AND
-inverse_distance_exponent
type: double
desc: exponent to use in denominator of inversion equation
default: 1
bounds: value > 0.0
AND
-inverse_distance_undefined_value
type: double
desc: the value to use when the output grid point is not defined
default: 1
bounds: value > 0.0

ALL OF the Mutually Inclusive Group:

-idsfft_method
type: flag
desc: use 2d fourier analysis flag
AND
-idsfft_npoints
type: double
desc: number of points to use in computing partial derivatives
default: 5
bounds: value > 0.0

Mutually Exclusive Group; if desired, specify ONE of:

-compute_grid_min_max
type: flag
desc: Compute output grid min/max from input location data
OR

ALL OF the Mutually Inclusive Group:

-user_grid_min_max
type: flag
desc: user defined grid min/max vertices, in 2D
AND
-user_grid_x_min
type: double
desc: X min coordinate for interpolation grid
default: 0
bounds: no range checking
AND
-user_grid_y_min
type: double
desc: Y min coordinate for interpolation grid
default: 0
bounds: no range checking
AND
-user_grid_x_max
type: double
desc: X max coordinate for interpolation grid
default: 1
bounds: no range checking
AND
-user_grid_y_max
type: double
desc: Y max coordinate for interpolation grid
default: 1
bounds: no range checking

EXAMPLES

SEE ALSO

RESTRICTIONS

REFERENCES

COPYRIGHT

Copyright (C) 1996,1997 , The Regents of the University of California. All rights reserved.