From dc5bdc24dfcb2729d8f4e491ce59302f274211e6 Mon Sep 17 00:00:00 2001 From: Mark Wolfman Date: Tue, 23 Jan 2024 08:58:09 -0600 Subject: [PATCH] Removed SR-570 gain mixin class and just rolled everything up into GainSignal. --- apstools/devices/srs570_preamplifier.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/apstools/devices/srs570_preamplifier.py b/apstools/devices/srs570_preamplifier.py index aca009ddb..6d4912ef1 100644 --- a/apstools/devices/srs570_preamplifier.py +++ b/apstools/devices/srs570_preamplifier.py @@ -114,7 +114,7 @@ def calculate_settle_time(gain_value: int, gain_unit: int, gain_mode: str): return settling_times.get((gain_value, gain_unit, gain_mode)) -class GainMixin: +class GainSignal(EpicsSignal): """A signal where the settling time depends on the pre-amp gain. Used to introduce a specific settle time when setting to account @@ -122,8 +122,6 @@ class GainMixin: """ - _settle_time = staticmethod(calculate_settle_time) - def set(self, value, *, timeout=DEFAULT_WRITE_TIMEOUT, settle_time="auto"): """Set the value of the Signal and return a Status object. @@ -169,21 +167,12 @@ def set(self, value, *, timeout=DEFAULT_WRITE_TIMEOUT, settle_time="auto"): if mode == "LOW DRIFT": mode = "LOW NOISE" # Calculate settling time - _settle_time = self._settle_time(gain_value=val, gain_unit=unit, gain_mode=mode) + _settle_time = calculate_settle_time(gain_value=val, gain_unit=unit, gain_mode=mode) else: _settle_time = settle_time return super().set(value, timeout=timeout, settle_time=_settle_time) -class GainSignal(GainMixin, EpicsSignal): - """A signal where the settling time depends on the pre-amp gain. - - Used to introduce a specific settle time when setting to account - for the amp's R–C relaxation time when changing gain. - - """ - - class SRS570_PreAmplifier(PreamplifierBaseDevice): """ Ophyd support for Stanford Research Systems 570 preamplifier from synApps.