From 6ce2af4c300ce310c2aaf0aeabcccb0b3ae62e97 Mon Sep 17 00:00:00 2001 From: Wouter van Reeven Date: Fri, 23 Aug 2024 13:28:23 +0200 Subject: [PATCH] Remove dependency on removed UnitToRead enum. --- doc/news/DM-45930.bugfix.rst | 1 + python/lsst/ts/observatory/control/base_calsys.py | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) create mode 100644 doc/news/DM-45930.bugfix.rst diff --git a/doc/news/DM-45930.bugfix.rst b/doc/news/DM-45930.bugfix.rst new file mode 100644 index 00000000..aab3970a --- /dev/null +++ b/doc/news/DM-45930.bugfix.rst @@ -0,0 +1 @@ +Remove dependency on removed UnitToRead enum. \ No newline at end of file diff --git a/python/lsst/ts/observatory/control/base_calsys.py b/python/lsst/ts/observatory/control/base_calsys.py index f22a5127..55fa381b 100644 --- a/python/lsst/ts/observatory/control/base_calsys.py +++ b/python/lsst/ts/observatory/control/base_calsys.py @@ -28,7 +28,6 @@ import yaml from lsst.ts import salobj -from lsst.ts.xml.enums.Electrometer import UnitToRead from .remote_group import RemoteGroup from .utils import get_data_path @@ -87,15 +86,13 @@ async def setup_electrometers( integration_time : `float` Electrometer measurement range. """ - electrometer_mode = getattr(UnitToRead, mode).value - for electrometer in [ getattr(self.rem, component_name) for component_name in self.components_attr if "electrometer" in component_name ]: await electrometer.cmd_setMode.set_start( - mode=electrometer_mode, + mode=mode, timeout=self.long_timeout, ) await electrometer.cmd_setRange.set_start(