Skip to content

swath builtin

swath(
    coords,
    values,
    width,
    *,
    azimuth=None,
    axis=None,
    weights=None,
    density=None,
)

Mean of values per slice of width along azimuth (degrees from north) or axis ("x", "y", "z"); slices start at 0 so swaths of samples and blocks line up.

Each value stands for weights × density tonnes, as in grade_tonnage, so slice tonnages and metals add up to the totals at cutoff -inf.

Parameters:

Name Type Description Default
coords (PointSet, BlockModel or array_like)

Samples or blocks, or their (n, 2) or (n, 3) coordinates.

required
values array_like or str

Values, or their column in coords.

required
width float

Slice width.

required
azimuth float
None
axis (x, y, z)

Direction of the slices; give one.

"x"
weights array_like or str

Declustering weights or volumes; default the block volumes of a BlockModel, else 1.

None
density (float, array_like or str)

Density of each value; default 1.

None

Returns:

Type Description
Table

center, n, mean (weighted by weights), tonnage and metal of the non-empty slices.

used in