Commit a63d5f50 authored by whooie's avatar whooie
Browse files

crop the image to a middle ninth

parent 278281b3
......@@ -190,7 +190,9 @@ def compute_mot_number(image, QE, gain, exposure_time, solid_angle,
detuning, intensity_parameter):
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
H, W = image.shape
im = image[H//3:2*H//3, W//3:2*W//3].astype(np.float64)
electron_rate = im.sum() / 16 # get to 12-bit values
photon_rate \
= electron_rate \
/ 10**(gain / 10) \
......
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