From fa57a8b4850ce68fb4eccbae153c5270d5291cf3 Mon Sep 17 00:00:00 2001 From: Stanislaw Malinowski Date: Wed, 21 Aug 2024 11:59:01 +0100 Subject: [PATCH] test lookup table --- src/dodal/devices/i18/IdGapLookupTable.py | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/dodal/devices/i18/IdGapLookupTable.py diff --git a/src/dodal/devices/i18/IdGapLookupTable.py b/src/dodal/devices/i18/IdGapLookupTable.py new file mode 100644 index 0000000000..f82e7135d0 --- /dev/null +++ b/src/dodal/devices/i18/IdGapLookupTable.py @@ -0,0 +1,25 @@ +from bluesky.protocols import Movable +from ophyd_async.core import ( + AsyncStatus, + StandardReadable, +) + +from dodal.log import LOGGER + + +class LookupTable(StandardReadable, Movable): + def __init__(self, prefix: str, name: str = ""): + with self.add_children_as_readables(): + # self.actual_transmission = epics_signal_r(float, prefix + "MATCH") + print("test") + + super().__init__(name) + + @AsyncStatus.wrap + async def set(self, transmission: float): + LOGGER.debug("Updating the lookup table ") + await self._use_current_energy.trigger() + LOGGER.info(f"Setting desired transmission to {transmission}") + await self._desired_transmission.set(transmission) + LOGGER.debug("Sending change filter command") + await self._change.trigger()