]
""" open all files, and split into measurent times"""
polylines = [[[] for t in times] for i in range(0, len(names))]
properties = [[[] for t in times] for i in range(0, len(names))]
functions = [[[] for t in times] for i in range(0, len(names))]
for i in range(0, len(names)):
    print(names[i])
    j = len(times) - 1
    p, properties[i][j], functions[i][j] = rsml.read_rsml(
        "RSML/" + names[i])  # read file to final time step
    p = [[
        np.array([p[i][j][k] / 10 for k in range(0, 3)])
        for j in range(0, len(p[i]))
    ] for i in range(0, len(p))]  # mm -> cm
    polylines[i][j] = p
    es.create_order(polylines[i][j], properties[i][j])  # add root order
    # es.create_length(polylines[i][j], properties[i][j])  # add root order
    for k in range(0, j):  # truncate the others
        polylines[i][k], properties[i][k], functions[i][
            k] = es.measurement_time(polylines[i][j], properties[i][j],
                                     functions[i][j], times[k])
# polylines[i][j] contains i-th plant, j-th measurement time
""" find all base roots """
base_polylines = [[[] for t in times] for i in range(0, len(names))]
base_properties = [[[] for t in times] for i in range(0, len(names))]
for i in range(0, len(names)):
    for j in range(0, len(times)):
        base_polylines[i][j], base_properties[i][j] = es.base_roots(
            polylines[i][j], properties[i][j])
""" recalculate length """
for i in range(0, len(names)):
Example #2
0
        for j in range(0, len(p[i]))
    ] for i in range(0, len(p))]
    polylines[i][j] = p
    for k in range(0, j):  # truncate the others
        polylines[i][k], properties[i][k], functions[i][
            k] = es.measurement_time(polylines[i][j], properties[i][j],
                                     functions[i][j], times[k])
""" add diameters as property """
for i in range(0, len(names)):
    for j in range(0, len(times)):  # truncate the others
        es.create_diameters(polylines[i][j], properties[i][j],
                            functions[i][j])  # add diameter property
""" add order as property """
for i in range(0, len(names)):
    for j in range(0, len(times)):  # truncate the others
        es.create_order(polylines[i][j],
                        properties[i][j])  # add order property

# polylines[i][j] contains i-th plant, j-th measurement time
""" find all base roots """
base_polylines = [[[] for t in times] for i in range(0, len(names))]
base_properties = [[[] for t in times] for i in range(0, len(names))]
for i in range(0, len(names)):
    for j in range(0, len(times)):
        base_polylines[i][j], base_properties[i][j] = es.base_roots(
            polylines[i][j], properties[i][j])
""" find all first order laterals """
new_polylines = [[[] for t in times] for i in range(0, len(names))]
new_properties = [[[] for t in times] for i in range(0, len(names))]
for i in range(0, len(names)):
    for j in range(0, len(times)):
        new_polylines[i][j], new_properties[i][j] = es.laterals1(