Tree Mass¶
-
class
vivarium.processes.tree_mass.
TreeMass
(parameters=None)[source]¶ Bases:
vivarium.core.process.Step
Derive total mass from molecular counts and weights.
- Parameters
parameters (dict) –
Dictionary of parameters. The following keys are required:
from_path (
tuple
): Path to the root of the subtree whose mass will be summed.
-
name
= 'mass_deriver'¶
-
vivarium.processes.tree_mass.
calculate_mass
(value, path, node)[source]¶ Reducer for summing masses in hierarchy
- Parameters
value – The value to add mass to.
path – Unused.
node – The node whose mass will be added.
- Returns
The mass of the node (accounting for the node’s molecular weight, which should be stored in its
mw
property) added tovalue
.