Skip to content

grade_tonnage builtin

grade_tonnage(
    values,
    cutoffs,
    *,
    weights=None,
    density=None,
    categories=None,
    data=None,
)

Grade-tonnage curve straight from the data: tonnage, mean grade and metal at or above each cutoff.

Each value stands for weights × density tonnes, e.g. block volumes and densities, or composite lengths.

Parameters:

Name Type Description Default
values array_like or str

Grades, or their column in data; NaN is skipped.

required
cutoffs array_like

Cutoff grades in the unit of the values, or texts such as "0.5 g/t"; -inf keeps everything.

required
weights array_like or str

Volume or declustering weight of each value; default the volumes of a BlockModel data, else 1.

None
density (float, array_like or str)

Density of each value; default 1.

None
categories array_like or str

Category (e.g. domain) of each value, int or str; adds a curve per category.

None
data (PointSet, BlockModel, Table or dict)

Where column names are looked up.

None

Returns:

Type Description
Table

category (with categories: sorted, then "all"), cutoff, tonnage, mean_grade (null when nothing is above) and metal (tonnage × mean grade). Cutoffs and grades take the unit of values; when the volumes (block model length_unit or weights) and the density have units, tonnage reads in t, kt or Mt and metal in the metal units of the grade (kg metal, koz metal, ...), each scaled to read best.

used in