Skip to content
Snippets Groups Projects
Commit b95e79fc authored by pswain's avatar pswain
Browse files

changed max5px to max5px_median

parent 87a20fd8
No related branches found
No related tags found
No related merge requests found
......@@ -90,9 +90,10 @@ def max2p5pc(cell_mask, trap_image) -> float:
return np.mean(top_values)
def max5px(cell_mask, trap_image) -> float:
def max5px_median(cell_mask, trap_image) -> float:
"""
Find the mean of the five brightest pixels in the cell.
Find the mean of the five brightest pixels in the cell divided by the
median of all pixels.
Parameters
----------
......@@ -105,7 +106,7 @@ def max5px(cell_mask, trap_image) -> float:
top_values = bn.partition(pixels, len(pixels) - 5)[-5:]
# find mean of five brightest pixels
max5px = np.mean(top_values)
return max5px
return max5px / np.median(pixels)
def std(cell_mask, trap_image):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment