-
assigned issue to
Question about Detection module
Issue #32
resolved
Hey,
I noticed something unwanted when using the Detection module to find peaks in a SNR image. Currently the loop over the maxima is constructed such that also the next peak below the threshold will be returned:
max_val_criter = np.nanmax(image_cpy)
while max_val_criter >= threshold:# and k <= max_attempts:
k += 1
# Find the maximum value in the current criterion map. At each iteration the previous maximum is masked out.
max_val_criter = np.nanmax(image_cpy)
Shouldn't be the criterion:
while max_val_criter > threshold:# and k <= max_attempts:
What is the purpose of looping for one more peak?
With kind regards, Jonas
Comments (4)
-
-
- changed status to open
-
You are right!
There is no purpose of looping one more time. Thanks for catching this! (The only thing I would say is the idea behind the function was more to list blobs in the image for which you can apply a hard threshold later on.)
I corrected this in the latest commit (including the grand cleaning of the code).
JB
-
- changed status to resolved
Also closing this issue as it seems like it has been addressed. Please reopen if I'm mistaken. Thanks!
- Log in to comment