Script execution
This commit is contained in:
@@ -14,14 +14,12 @@ ref = CrlogicSensor("ScalerRef", "SCALER15", True)
|
||||
|
||||
class AbsCalc(Readable):
|
||||
def read(self):
|
||||
d = math.fabs(i1.take())
|
||||
return float('NaN') if (d==0) else math.log(math.fabs(i0.take()) /d)
|
||||
return math.log(math.fabs(i0.take()) / math.fabs(i1.take()))
|
||||
abs_calc = AbsCalc()
|
||||
|
||||
class ECalc(Readable):
|
||||
def read(self):
|
||||
d = crystal.take() * math.sin( math.radians(bragg.readback.take()))
|
||||
return float('NaN') if (d==0) else (12.39842 / d)
|
||||
return 12.39842 / (crystal.take() * math.sin( math.radians(bragg.readback.take())))
|
||||
e_calc = ECalc()
|
||||
sensors = [RegisterCache(crystal), i0, i1, i2, ref, abs_calc, e_calc]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user