radius#
functions to compute the vertex radii in different way. functions to set the vertices length, to compute the total surface and volume of the MTG
- openalea.hydroroot.radius.compute_length(g, length=0.0001)[source]#
Set the length of each vertex of the MTG
- Parameters:
g – (MTG)
length – (float) - vertices length (Default value = 1.e-4)
- Returns:
-g
- openalea.hydroroot.radius.compute_relative_position(g)[source]#
Compute the position of each segment relative to the axis bearing it. Add the properties “position” and “relative_position” to the MTG. g.properties()[‘position’] is in meter the distance from the tip in unit of g.property(‘length’), in hydroroot must be m g.properties()[‘relative_position’] is the distance from the tip relative to the axis bearing it (base is 1, tip is 0)
- Parameters:
g – (MTG)
- Returns:
g
- openalea.hydroroot.radius.compute_surface(g)[source]#
- Compute the total surface of the MTG
in hydroroot length unit is the m so the surface is in square meters
- Parameters:
g – (MTG)
- Returns:
g
surface in square length unit of g.property(‘radius’) and g.property(‘length’)
- openalea.hydroroot.radius.compute_volume(g)[source]#
- Compute the total volume of the MTG
in hydroroot length unit is the m so the volume is in cubic meters
- Parameters:
g – (MTG)
- Returns:
g
volume in cubic length unit of g.property(‘radius’) and g.property(‘length’)
- openalea.hydroroot.radius.cont_radius(g, r_base, r_tip)[source]#
Compute the radius of each segment of a root system. Set radius for elements of a mtg with an increase rate computed from given base and tip radius in a continuous way.
- Parameters:
g – (MTG)
r_base – (float) - radius of the base
r_tip – (float) - radius of the tip
- Returns:
g
- openalea.hydroroot.radius.discont_radius(g, r_base, r_tip)[source]#
Compute the radius of each segment of a root system.
Set radius for elements of a mtg with an increase rate computed from the length of the longest axis and its base and tip radius.
Radius can be discontinuous e.g. for a young/small lateral on an old root, the young root radius is very small initially compared to the old one.
- Parameters:
g – (MTG)
r_base – (float) - radius of the base
r_tip – (float) - radius of the tip
- Returns:
g
- openalea.hydroroot.radius.ordered_radius(g, ref_radius=0.0001, order_decrease_factor=0.5)[source]#
Compute the radius of each segment of a root system.
Set radius for elements of a mtg with fixed decrease between each order.
ref_radius: reference radius of the primary root (in m) order_decrease_factor: radius decrease factor applied when increasing order
- Parameters:
g – (MTG)
ref_radius – the radius of the primary root (Default value = 1e-4)
order_decrease_factor – then the decrease factor per order (Default value = 0.5)
- Returns:
g
if primary root as a radius \(r\), the first order lateral has a radius of \(r \beta\), the second order lateral \(r \beta^2\), with \(\beta\) the order decrease factor
- openalea.hydroroot.radius.radius(g)[source]#
calculate the radius from the property diameter :param g: :return:
Download the source file ../../src/openalea/hydroroot/radius.py.