diff --git a/frappy_psi/cryoltd.py b/frappy_psi/cryoltd.py index cb7d75f7..8feb7212 100644 --- a/frappy_psi/cryoltd.py +++ b/frappy_psi/cryoltd.py @@ -27,7 +27,7 @@ changed from the client is fixed for at least 10 seconds. """ import re import time -from math import copysign +from math import copysign, sqrt from frappy.core import HasIO, StringIO, Readable, Drivable, Parameter, Command, \ Module, Property, Attached, Enum, IDLE, BUSY, ERROR, nopoll, PersistentParam, \ PersistentMixin @@ -624,3 +624,15 @@ class Compressor(Channel, Drivable): """reset error""" self.sendcmd('Set:Compressor:Reset ') self._error_text = '' + + +''' +class Absfield(Readable): + main = Attached() + bx = Attached() + by = Attached() + bz = Attached() + + def read_value(self): + return sqrt((self.main + self.bz) ** 2 + self.by ** 2 + self.bx ** 2) +'''