Пример #1
0
            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])

# for Faba this is exactly 1 for all 5 measurements
""" recalculate length (should not alter anything)"""
for i in range(0, len(names)):
    for j in range(0, len(times)):
        es.create_length(base_polylines[i][j], base_properties[i][j])
""" fit data """
print()
l = np.array(
    [[base_properties[i][j]["length"][0] for i in range(0, len(names))]
     for j in range(0, len(times))])

r0, f0 = es.fit_taproot_r(l[0:1, :], [times[0]], fixed_k)
k0 = fixed_k
print("k fixed, first ", r0, "cm/day", k0, "cm; error", f0)

r1, f1 = es.fit_taproot_r(l, times, fixed_k)
k1 = fixed_k
print("k fixed        ", r1, "cm/day", k1, "cm; error", f1)

r2, k2, f2 = es.fit_taproot_rk(l, times)
Пример #2
0
properties = new_properties
print('first order laterals done')

# print()
# for i in range(0, len(names)):
#     print("Number of nodes", len(base_polylines[i][-1][0]))  # approx 1 node per mm

# for Faba this is exactly 1 for all 5 measurements
""" plots """
# prop = properties[0][0]["length"]
# rsml.plot_rsml(polylines[0][0],prop)
# plt.show()
""" recalculate length """
for i in range(0, len(names)):
    for j in range(0, len(times)):
        es.create_length(polylines[i][j],
                         properties[i][j])  # add root length for all roots
        es.create_length(base_polylines[i][j], base_properties[i][j])
""" reconstruct laterals """
for i in range(0, len(names)):
    for j in range(0, len(times)):
        # print("\nMeasurement", i, ", time", j, "number of roots", len(polylines[i][j]))
        polylines[i][j], properties[i][j] = es.reconstruct_laterals(
            polylines[i][j],
            properties[i][j],
            base_polylines[i][j][0],
            snap_radius=0.5 * 116.93)  # pixel?
        # es.create_order(polylines[i][j], properties[i][j])  # add root order
""" measure remaining tap root parameters """
print()
la_, la_delay_, lb_, ln_, theta_, a_, a0_ = [], [], [], [], [], [], []
for i in range(0, len(names)):