generator_measured_root#

openalea.hydroroot.generator.measured_root.add_branching(g, df, ramifs=None, Order=0, segment_length=0.0001)[source]#

add branching of a given order on the previous order

called by mtg_from_aqua_data()

Parameters:
  • g – MTG

  • df – (DataFrame)

  • ramifs – (dict) - dict of a list with tuple (vid, lr) vid is the vertex index on the parent root from which the lateral of length lr starts (Default value = None)

  • Order – (int) - the order of the new branching (Default value = 0)

  • segment_length – (float) - length in m of the vertices (Default value = 1e-4)

Returns:

  • new_ramifs: dict to used as the ramifs parameter for a new call of add_branching

openalea.hydroroot.generator.measured_root.mtg_builder(primary_length, primary_length_data, lateral_length_data, segment_length=0.0001, branching_variability=None, branching_delay=None, length_law=None, nude_tip_length=20, order_max=5, seed=None)[source]#

‘Deprecated’

Create a MTG from length laws.

The first law is the length of the primary root. The second law is the length of the ramification.

The primary root is of length ‘total_length’. It is discretized following the law length_base.

All the variables are expressed in meters.

Parameters:
  • primary_length

  • primary_length_data

  • lateral_length_data

  • segment_length – (Default value = 1e-4)

  • branching_variability – (Default value = None)

  • branching_delay – (Default value = None)

  • length_law – (Default value = None)

  • nude_tip_length – (Default value = 20)

  • order_max – (Default value = 5)

  • seed – (Default value = None)

openalea.hydroroot.generator.measured_root.mtg_from_aqua_data(df, segment_length=0.0001)[source]#

Reconstruct MTG from pandas DataFrame with the following columns:

  • 1st col: ‘db’ (float) distance from base in m on the parent root where starts the lateral root

  • 2nd col: ‘lr’ (float) length in m of the corresponding lateral root

  • 3d col: ‘order’ (string) = ‘1’ if parent root is the primary root, = ‘1-n’ if the parent root is a lateral root that starts at the node n on the parent root

Parameters:
  • df – pandas (DataFrame)

  • segment_length – (float) length of the vertices in hydroroot should be in m (Default value = 1e-4)

Returns:

  • g: MTG with the following properties set: edge_type, label, base_length, length

Note

At this stage 2022-08-23 tested with a maximum order of 2

See also

hydroroot.read_file.read_archi_data()

Download the source file ../../src/openalea/hydroroot/generator/measured_root.py.