From 710085d211c31f62c5134113e770f3efa1d64443 Mon Sep 17 00:00:00 2001 From: Iva Laginja Date: Thu, 7 May 2026 11:23:37 +0200 Subject: [PATCH 1/2] Force 32-bit integer for data stream that expects it --- catkit2/services/newport_picomotor/newport_picomotor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catkit2/services/newport_picomotor/newport_picomotor.py b/catkit2/services/newport_picomotor/newport_picomotor.py index 3b402c102..99879f9f4 100644 --- a/catkit2/services/newport_picomotor/newport_picomotor.py +++ b/catkit2/services/newport_picomotor/newport_picomotor.py @@ -81,7 +81,7 @@ def get_current_position(self, axis_name): # Update current position data stream. stream = self.axis_current_positions[axis_name] - stream.submit_data(np.array([current_position])) + stream.submit_data(np.array([current_position], dtype=np.int32)) return current_position From 42adff491a2a37f140ffd75ac3ea96fcb837fd51 Mon Sep 17 00:00:00 2001 From: Iva Laginja Date: Sun, 24 May 2026 18:06:20 +0200 Subject: [PATCH 2/2] Make the data stream int64 instead --- catkit2/services/newport_picomotor/newport_picomotor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catkit2/services/newport_picomotor/newport_picomotor.py b/catkit2/services/newport_picomotor/newport_picomotor.py index 99879f9f4..21075a547 100644 --- a/catkit2/services/newport_picomotor/newport_picomotor.py +++ b/catkit2/services/newport_picomotor/newport_picomotor.py @@ -53,7 +53,7 @@ def __init__(self): def add_axis(self, axis_name): self.axis_commands[axis_name] = self.make_data_stream(axis_name.lower() + '_command', 'int32', [1], 20) - self.axis_current_positions[axis_name] = self.make_data_stream(axis_name.lower() + '_current_position', 'int32', [1], 20) + self.axis_current_positions[axis_name] = self.make_data_stream(axis_name.lower() + '_current_position', 'int64', [1], 20) def set_current_position(self, axis_name, position): axis = self.axes[axis_name] @@ -81,7 +81,7 @@ def get_current_position(self, axis_name): # Update current position data stream. stream = self.axis_current_positions[axis_name] - stream.submit_data(np.array([current_position], dtype=np.int32)) + stream.submit_data(np.array([current_position], dtype=np.int64)) return current_position