Skip to content

Commit

Permalink
removes / 1e-9 as px_2_nm is alread in nm
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGamill-Sheffield committed Oct 9, 2024
1 parent c45ace6 commit bf5f392
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions topostats/tracing/pruning.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def _prune_by_length( # pylint: disable=too-many-locals # noqa: C901
segment = np.where(labeled_segments == segment_idx, conv_skeleton, 0)
# get segment length
ordered_coords = order_branch(np.where(segment != 0, 1, 0), [0, 0])
segment_length = coord_dist(ordered_coords, self.pixel_to_nm_scaling)[-1] / 1e-9
segment_length = coord_dist(ordered_coords, self.pixel_to_nm_scaling)[-1]
# check if endpoint
if 2 in segment and segment_length < max_length:
# prune
Expand Down Expand Up @@ -649,7 +649,6 @@ def filter_segments(self, segments: npt.NDArray) -> npt.NDArray:
height_values = self._get_branch_medians(segments)
elif self.method_values == "mid":
height_values = self._get_branch_middles(segments)
print(f"{height_values=}")
# threshold heights to obtain indexes of branches to be removed
if self.method_outlier == "abs":
idxs = self._get_abs_thresh_idx(height_values, self.height_threshold)
Expand Down

0 comments on commit bf5f392

Please sign in to comment.