From c3806ef976bf473e13e465020ca0205a0366718a Mon Sep 17 00:00:00 2001
From: swittl <simon.wittl@th-deg.de>
Date: Thu, 28 Nov 2024 15:57:30 +0100
Subject: [PATCH] bug fix

---
 src/thd_json/dict_converter.py      | 2 +-
 src/thd_json/projection/__init__.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/thd_json/dict_converter.py b/src/thd_json/dict_converter.py
index a17e845..60b3b80 100644
--- a/src/thd_json/dict_converter.py
+++ b/src/thd_json/dict_converter.py
@@ -3,7 +3,7 @@ import numpy as np
 
 def detector_coord_to_dict(detector_coord: np.ndarray):
     assert len(detector_coord.shape) == 1
-    assert detector_coord.shape[2] == 3
+    assert detector_coord.shape[0] == 2
     detector_coord = detector_coord.tolist()
     return {"u": detector_coord[0], "v": detector_coord[1]}
 
diff --git a/src/thd_json/projection/__init__.py b/src/thd_json/projection/__init__.py
index 06c9b53..0c4b663 100644
--- a/src/thd_json/projection/__init__.py
+++ b/src/thd_json/projection/__init__.py
@@ -64,7 +64,7 @@ def get_projection_dict(
     )
 
     projection['detector'] = get_detector_dict(image_dimensions_px, pixel_pitch_mm)
-    projection['image'] = {'image_path', str(image_path)}
+    projection['image'] = {'image_path': str(image_path)}
 
     return projection
 
-- 
GitLab