frappy_psi.cryoltd: add absolute field

This commit is contained in:
2026-05-12 14:41:57 +02:00
parent 077a182b4d
commit ed9ed764a0
+13 -1
View File
@@ -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 <CH>')
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)
'''