Skip to content

Commit

Permalink
Enforce saturation limit in detector.adc
Browse files Browse the repository at this point in the history
  • Loading branch information
andykee committed Nov 26, 2024
1 parent 4cd160a commit 654ac74
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lentil/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ def adc(img, gain, saturation_capacity=None, warn_saturate=False, dtype=None):
if dtype is not None:
img = img.astype(dtype)

img[img > saturation_capacity - 1] = saturation_capacity - 1

return img


Expand Down

0 comments on commit 654ac74

Please sign in to comment.