Skip to content

Commit

Permalink
Update soma_proposal_generation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-grim authored Jan 4, 2025
1 parent 4a7a8f5 commit 0000f56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/aind_exaspim_soma_detection/soma_proposal_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,15 @@ def filter_proposals(img_patch, proposals, max_proposals=10, radius=5):

def spatial_filtering(proposals, radius):
"""
Filters a list of proposals by merging nearby points based on a given
Filters a list of proposals by merging nearby proposals based on a given
distance threshold.
Parameters
----------
proposals : List[Tuple[float]]
List of coordinates that represent the location of proposals.
radius : float
Distance that is used to find points to be filtered out.
Distance that is used to find nearby proposals to be merged.
Returns
-------
Expand All @@ -326,7 +326,7 @@ def spatial_filtering(proposals, radius):
nbs.append(coord)
visited.add(coord)

# Generate point to add
# Generate coordinate to add
nbs = np.vstack(nbs)
filtered_proposals.append(tuple(np.mean(nbs, axis=0)))
return filtered_proposals
Expand Down

0 comments on commit 0000f56

Please sign in to comment.