Skip to content

Commit

Permalink
Add network_length trait before calculating network_solidity.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lin Wang committed Aug 4, 2023
1 parent 555d5b0 commit dff789c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion sleap_roots/trait_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
get_bbox,
get_network_distribution_ratio,
get_network_distribution,
get_network_length,
get_network_solidity,
get_network_width_depth_ratio,
)
Expand Down Expand Up @@ -330,7 +331,7 @@ def get_traits_value_frame(
TraitDef(
name="network_solidity",
fn=get_network_solidity,
input_traits=["primary_max_length_pts", "lateral_pts", "chull_area"],
input_traits=["network_length", "chull_area"],
scalar=True,
include_in_csv=True,
kwargs={"monocots": monocots},
Expand Down Expand Up @@ -489,6 +490,15 @@ def get_traits_value_frame(
kwargs={"fraction": network_fraction, "monocots": monocots},
description="Scalar of ratio of the root network length in the lower fraction of the plant over all root length.",
),
TraitDef(
name="network_length",
fn=get_network_length,
input_traits=["primary_length", "lateral_lengths"],
scalar=True,
include_in_csv=False,
kwargs={"monocots": monocots},
description="Scalar of all roots network length.",
),
TraitDef(
name="primary_base_pt_y",
fn=get_base_ys,
Expand Down

0 comments on commit dff789c

Please sign in to comment.