Skip to content

Commit

Permalink
Fix type of array from beamline testing (#937)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
DominicOram and rtuck99 authored Dec 3, 2024
1 parent e880833 commit 2e4bd82
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/dodal/devices/oav/pin_image_recognition/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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.
"""
Expand Down

0 comments on commit 2e4bd82

Please sign in to comment.