Skip to content

localize builtin

localize(
    smus, ranking, panels, realizations, *, name="localized"
)

Localized grades of selective blocks from their simulated realizations.

Each panel pools the n realizations of the blocks it holds, sorts the pooled values, and gives its block ranked i the mean of the i-th chunk of n sorted values. The blocks average to the pooled mean and reproduce the pooled grade-tonnage curve at tonnages k / blocks, without a change-of-support model. Partial panels localize over the blocks present.

Parameters:

Name Type Description Default
smus BlockModel

Selective blocks nesting in the panels: same rotation, sizes dividing the panel sizes, grids aligned; not sub-blocked.

required
ranking str

Column of smus ordering the blocks within a panel, such as a direct kriging or the E-type mean of the realizations; ties follow row order.

required
panels BlockModel
required
realizations array_like

(n, len(smus)) realizations at selective-block support, as from simulate(..., blocks=smus, keep=True).realizations.

required
name str

Name of the new column.

"localized"

Returns:

Type Description
BlockModel

smus with the localized grades; null outside every panel.

Raises:

Type Description
InvalidInput

If the blocks do not nest, a block inside a panel has a null rank, or the realizations are not finite.

used in