User's Reference - AutoGrid

### AutoGrid

Category

Realization

Function

Maps scattered points onto a grid.

Syntax

    output = AutoGrid(input, densityfactor, nearest,
                      radius,exponent,missing);

Inputs

Name | Type | Default | Description
--- | --- | --- | ---
`input` | field or vector list | none | field with positions to regrid
`densityfactor` | scalar or vector | 1.0 | densityfactor for grid
`nearest` | integer or string | 1 | number of nearest neighbors to use
`radius` | scalar | appropriate | radius from grid point to consider
`exponent` | scalar | 1.0 | weighting exponent
`missing` | value | no default | missing value to be inserted if necessary

Outputs

Name | Type | Description
--- | --- | ---
`output` | field | regridded field

Functional Details

This module uses a specified set of scattered points (`input`) to assign data to every position of a grid. This module differs from Regrid in that you do not supply a grid; one is constructed automatically for you.

`input` | should be either (1) a field with a 1-, 2-, or 3-dimensional "positions" component or (2) a list of 1-, 2-, or 3-dimensional vectors. In the second case, the vectors are interpreted as positions.
`densityfactor` | specifies how to modify the automatically generated grid. By default the automatically generated grid will have approximately as many points as there are points in `input`, and each cell will be square. If `densityfactor` is a single scalar value, then there will be `densityfactor` times as many cells in each dimension. If `densityfactor` is a vector, then you can modify the number of cells in each dimension differentially.
`nearest` | must be an integer or the string "infinity." An integer value specifies the number of nearest points (to each grid point) to be used in computing an average data value for that grid point.
`radius` | By default, only those points within an automatically computed radius will be considered when assigning data values to grid positions. This automatically computed radius is twice the largest dimension of a cell in the grid. You can explicitly set the radius to a value measured in the units of the "positions" component of `input`. If you specify `radius`="infinity", then no cutoff in distance will be used; all points will contribute to the result at each grid point. AutoGrid attaches a "AutoGrid radius" attribute to `output`, with a value equal to the radius used, or the string "infinity".
`exponent` | The averaging method is a weighted average. The expression for this average is 1/radius`(exponent)`. The default value is 1.0, reducing the expression to the reciprocal of the radius.
`missing` | is used when `radius` is set to a value other than "infinity." The parameter specifies how to treat those grid points for which no points in `input` occur within the specified radius. If `missing` is not set, the module creates an "invalid positions" component, and grid points with no assigned data value are invalidated. If `missing` is set, the data value is inserted for the missing data values. It must match the data component of `input` in rank, type, and shape. All components that are position-dependent are treated in the same way as the "data" component.

Components

Adds a "connections" component. The "positions" and "connections" components are those of `grid` while all components in `input` that depend on "positions" will be present in the output, modified by averaging.

Example Visual Programs

    SIMPLE/AutoGrid.net
    ConnectingScatteredPoints

See Also

Connect, Regrid, Include

[ OpenDX Home at IBM | OpenDX.org ]