Commit 14a563b1 authored by whooie's avatar whooie
Browse files

better image clipping detection

parent 7a376f7d
......@@ -168,7 +168,8 @@ class FluorescenceData(ImagingData):
for label, array in self.arrays.items():
if label == "background":
continue
if array.max() == np.iinfo(array.dtype).max:
dtype_info = np.iinfo(array.dtype)
if array.max() >= (dtype_info.max - dtype_info.bits):
print("[imaging] WARNING: image may contain clipping")
N = compute_mot_number(
array if "background" not in self.arrays.keys() \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment