Commit 278281b3 authored by whooie's avatar whooie
Browse files

better clipping detection in MOT number calculation

parent 6c346f84
......@@ -188,7 +188,7 @@ class FluorescenceData(ImagingData):
def compute_mot_number(image, QE, gain, exposure_time, solid_angle,
detuning, intensity_parameter):
if image.max() >= 2**16:
if image.max() >= np.iinfo(image.dtype).max:
print("[imaging] WARNING: image may contain clipping")
electron_rate = image.astype(np.float64).sum() / 16 # get to 12-bit values
photon_rate \
......
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