Skip to content

Commit 2e4bd82

Browse files
DominicOramrtuck99
andauthored
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 <robert.tuck@diamond.ac.uk>
1 parent e880833 commit 2e4bd82

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/dodal/devices/oav/pin_image_recognition/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def __init__(self, prefix: str, name: str = ""):
6161
self.triggered_bottom_edge, self._bottom_edge_setter = soft_signal_r_and_setter(
6262
Array1D[np.int32], name="triggered_bottom_edge"
6363
)
64-
self.array_data = epics_signal_r(Array1D[np.uint8], f"pva://{prefix}PVA:ARRAY")
64+
self.array_data = epics_signal_r(np.ndarray, f"pva://{prefix}PVA:ARRAY")
6565

6666
# Soft parameters for pin-tip detection.
6767
self.preprocess_operation = soft_signal_rw(int, 10, name="preprocess")
@@ -99,9 +99,7 @@ def _set_triggered_values(self, results: SampleLocation):
9999
self._top_edge_setter(results.edge_top)
100100
self._bottom_edge_setter(results.edge_bottom)
101101

102-
async def _get_tip_and_edge_data(
103-
self, array_data: Array1D[np.uint8]
104-
) -> SampleLocation:
102+
async def _get_tip_and_edge_data(self, array_data: np.ndarray) -> SampleLocation:
105103
"""
106104
Gets the location of the pin tip and the top and bottom edges.
107105
"""

0 commit comments

Comments
 (0)