-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
local_max_peak_finder reports too many spots when pixels have identical max intensity #1826
Comments
Do we not want to expose |
My concern with using I think a better solution would be to use |
|
What I meant is using Adding support for kwargs in |
Description
Running LocalMaxPeakFinder on an image where multiple pixels at the "peak" have the same intensity value (possibly due to saturation or clipping) returns SpotFindingResults where every pixel is counted as a separate spot. This occurs even with
min_distance
set to a large value.This is due to the correct behavior of
peak_local_max()
which says: "If there are multiple local maxima with identical pixel intensities inside the region defined withmin_distance
, the coordinates of all such pixels are returned."One possible fix is to use turn coordinates into ndimage array and use
scipy.ndimage.label
andskimage.measure.regionprops
Steps/Code to Reproduce
In in situ sequencing notebook after image registration run the following code:
Expected Results
One spot found in each spot
Actual Results
Multiple spots found in each spot. The found spots are often neighboring and when examining intensity values I found they have the same intensities.
The text was updated successfully, but these errors were encountered: