Cast counts to float64 in h5 data

For correct calculation of count_err
This commit is contained in:
usov_i 2022-02-03 17:15:32 +01:00
parent 4bd6c6760e
commit 3234a544de

View File

@ -68,7 +68,7 @@ def read_detector_data(filepath, cami_meta=None):
ndarray: A 3D array of data, omega, gamma, nu. ndarray: A 3D array of data, omega, gamma, nu.
""" """
with h5py.File(filepath, "r") as h5f: 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) # reshape images (counts) to a correct shape (2006 issue)
n, cols, rows = counts.shape n, cols, rows = counts.shape