From 2e4bd82110cdbdc70ba75e992b21265b18849d9b Mon Sep 17 00:00:00 2001 From: Dominic Oram Date: Tue, 3 Dec 2024 12:22:46 +0000 Subject: [PATCH] Fix type of array from beamline testing (#937) * Fix type of array from beamline testing * Update method signatures to agree with pv data type --------- Co-authored-by: Robert Tuck --- src/dodal/devices/oav/pin_image_recognition/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/dodal/devices/oav/pin_image_recognition/__init__.py b/src/dodal/devices/oav/pin_image_recognition/__init__.py index 876c449f89..5e2c4d52c2 100644 --- a/src/dodal/devices/oav/pin_image_recognition/__init__.py +++ b/src/dodal/devices/oav/pin_image_recognition/__init__.py @@ -61,7 +61,7 @@ def __init__(self, prefix: str, name: str = ""): self.triggered_bottom_edge, self._bottom_edge_setter = soft_signal_r_and_setter( Array1D[np.int32], name="triggered_bottom_edge" ) - self.array_data = epics_signal_r(Array1D[np.uint8], f"pva://{prefix}PVA:ARRAY") + self.array_data = epics_signal_r(np.ndarray, f"pva://{prefix}PVA:ARRAY") # Soft parameters for pin-tip detection. self.preprocess_operation = soft_signal_rw(int, 10, name="preprocess") @@ -99,9 +99,7 @@ def _set_triggered_values(self, results: SampleLocation): self._top_edge_setter(results.edge_top) self._bottom_edge_setter(results.edge_bottom) - async def _get_tip_and_edge_data( - self, array_data: Array1D[np.uint8] - ) -> SampleLocation: + async def _get_tip_and_edge_data(self, array_data: np.ndarray) -> SampleLocation: """ Gets the location of the pin tip and the top and bottom edges. """