add hardware ranges

This commit is contained in:
gac-furka
2022-04-27 17:53:28 +02:00
parent 295db9fbd0
commit 1d23650335

View File

@ -87,6 +87,29 @@ class QSpace3D(Device):
for name, value in kwargs.items():
setattr(self.dc.cons, name, value)
def hard_constraints(x):
if x["betain"]<0:
return False
if x["betaout"]<0:
return False
if x["nu"]<0:
return False
if x["nu"]>180:
return False
if x["mu"]<0:
return False
if x["mu"]>90:
return False
if x["chi"]<-30:
return False
if x["chi"]>30:
return False
if x["phi"]<-60:
return False
if x["phi"]>60:
return False
return True
# if I understand the examples/code correctly, then some more method calls are mandatory?
# those should probably all get shortcuts...