Skip to content

data_spacing builtin

data_spacing(
    targets,
    data,
    search,
    *,
    composite_length=None,
    holes=None,
    n=None,
    hull=False,
)

Equivalent data spacing (Cabral Pinto & Deutsch, 2017).

With a search, sqrt(V / (c n)): V the volume of the search ellipsoid, n the composites inside it around the target and c the composite length. Without, the plan form: the mean over n of sqrt(pi r^2 / n), r the mean plan distance to the n-th and n + 1-th nearest samples. Holes on a square grid of spacing s give about s in both forms.

Parameters:

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

Locations to measure at, e.g. block centroids.

required
data (Drillholes, PointSet or array_like)

Composites, or their (n, 2) or (n, 3) coordinates; a Drillholes stands for its interval midpoints.

required
search Search or None

Ellipsoid of the volume form, from its radius, rotation and ratios; None for the plan form.

required
composite_length float

c; default the median interval length of a Drillholes data. Required for other data with a search.

None
holes array_like or str

Hole of each sample, or its column in data; the plan form then counts each hole once, at its nearest sample.

None
n int or sequence of int

Neighbor ranks of the plan form, averaged; default 4 to 10.

None
hull bool

Null targets outside the plan convex hull of data.

False

Returns:

Type Description
ndarray

One spacing per target; NaN where the ellipsoid holds no composite, fewer than n + 1 samples or holes exist, or outside the hull.

Warns:

Type Description
UserWarning

When most targets have fewer than 4 composites inside the ellipsoid: enlarge the search.

used in