Skip to content
Snippets Groups Projects
Commit 278281b3 authored by whooie's avatar whooie
Browse files

better clipping detection in MOT number calculation

parent 6c346f84
No related branches found
No related tags found
No related merge requests found
......@@ -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 \
......
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