Skip to main content

ReportColumnSpec

GitHub source

ReportColumnSpec

evo.blockmodels.typed.report.ReportColumnSpec

Specification for a column in a report.

Parameters:

NameTypeDescriptionDefault
column_namestrThe name of the column in the block model.required
aggregationAggregationHow to aggregate the column values. Use Aggregation enum: - Aggregation.MASS_AVERAGE - Mass-weighted average (for grades) - Aggregation.SUM - Sum of values (for metal content)SUM
labelstr | NoneDisplay label for the column in the report.None
output_unit_idstr | NoneUnit ID for the output values. Use Units class constants: - Units.GRAMS_PER_TONNE - g/t (grades) - Units.PERCENT - % (grades) - Units.PPM - ppm (grades) - Units.KILOGRAMS - kg (metal content) - Units.TONNES - t (metal content) - Units.TROY_OUNCES - oz_tr (metal content)

Example::

<br/>>>> from evo.blockmodels import Units<br/>>>> from evo.blockmodels.typed import Aggregation, ReportColumnSpec<br/>>>><br/>>>> # For grade columns, use MASS_AVERAGE<br/>>>> grade_col = ReportColumnSpec(<br/>... column_name="Au",<br/>... aggregation=Aggregation.MASS_AVERAGE,<br/>... label="Au Grade",<br/>... output_unit_id=Units.GRAMS_PER_TONNE,<br/>... )<br/>>>> # For metal content columns, use SUM<br/>>>> metal_col = ReportColumnSpec(<br/>... column_name="Au_metal",<br/>... aggregation=Aggregation.SUM,<br/>... label="Au Metal",<br/>... output_unit_id=Units.KILOGRAMS,<br/>... )<br/>
None

Was this page helpful?