pyforestry.base.timber.timber_base package#

Submodules#

pyforestry.base.timber.timber_base.timber module#

Basic container class for individual tree parameters.

class pyforestry.base.timber.timber_base.timber.Timber(species: str, diameter_cm: float, height_m: float, double_bark_mm: float | None = None, crown_base_height_m: float | None = None, over_bark: bool | None = None, stump_height_m: float | None = 0.3)[source]#

Bases: object

Representation of a single tree with minimal attributes.

validate() → None[source]#

Validate that the provided tree attributes are sensible.

pyforestry.base.timber.timber_base.timber_volume_integrator module#

Timber Volume Integrator utilities and interfaces.

class pyforestry.base.timber.timber_base.timber_volume_integrator.TimberVolumeIntegrator[source]#

Bases: object

Numerically integrate a taper curve into a stem volume.

Given any Taper that can report a diameter at a height, this treats the stem as a stack of discs and integrates pi * (d/2)**2 over a height interval with scipy.integrate.quad(). It carries no science of its own: the shape comes entirely from the taper function passed in, which is where the published coefficients live.

Use it for a section volume between two heights, or for the whole stem between the stump and the tip.

static cylinder_volume_integrand(height, taper_instance)[source]#

Calculate the cross-sectional area. Now takes a taper instance.

static integrate_volume(height1, height2, taper_instance)[source]#

Integrate the volume of the cylinder between two heights.

Module contents#

Init utilities and interfaces.