From 7d354346d92ed6c369901953d441c20670a34955 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=B6ne=2C=20Tjark=20Leon=20Raphael?=
 <tjark.leon.raphael.groene@uni-hamburg.de>
Date: Mon, 16 Jun 2025 22:17:21 +0200
Subject: [PATCH] Update file maxwell_integrate_to_h5.py

---
 maxwell_integrate_to_h5.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/maxwell_integrate_to_h5.py b/maxwell_integrate_to_h5.py
index 5bc857d..35f14b7 100644
--- a/maxwell_integrate_to_h5.py
+++ b/maxwell_integrate_to_h5.py
@@ -137,9 +137,9 @@ def integrate_ims_in_dir(path_im, path_int, dtype_im=".tif", dtype_int=".dat"):
                 
                 for result in results_data:
                     filename_key = os.path.basename(result["filename"])
-                    hdf_store.put(f"entry/data/{filename_key}/q", pd.Series(result["q"]), format='table')
-                    hdf_store.put(f"entry/data/{filename_key}/I", pd.Series(result["I"]), format='table')
-                    hdf_store.put(f"entry/data/{filename_key}/dI", pd.Series(result["dI"]), format='table')
+                    hdf_store.put(f"entry/data/{filename_key}/q", pd.Series(np.array(result["q"], dtype=float)), format='table')
+                    hdf_store.put(f"entry/data/{filename_key}/I", pd.Series(np.array(result["I"], dtype=float)), format='table')
+                    hdf_store.put(f"entry/data/{filename_key}/dI", pd.Series(np.array(result["dI"], dtype=float)), format='table')
 
             print(f"Results for subdirectory {subdir_name} saved to CSV and HDF5 files using Nexus conventions.")
             del results_df
-- 
GitLab