From 3234a544de148f4076f106791378fe3f15950bb6 Mon Sep 17 00:00:00 2001 From: Ivan Usov Date: Thu, 3 Feb 2022 17:15:32 +0100 Subject: [PATCH] Cast counts to float64 in h5 data For correct calculation of count_err --- pyzebra/h5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyzebra/h5.py b/pyzebra/h5.py index ad4a733..89a18d2 100644 --- a/pyzebra/h5.py +++ b/pyzebra/h5.py @@ -68,7 +68,7 @@ def read_detector_data(filepath, cami_meta=None): ndarray: A 3D array of data, omega, gamma, nu. """ with h5py.File(filepath, "r") as h5f: - counts = h5f["/entry1/area_detector2/data"][:] + counts = h5f["/entry1/area_detector2/data"][:].astype(np.float64) # reshape images (counts) to a correct shape (2006 issue) n, cols, rows = counts.shape