diff --git a/script/local.py b/script/local.py index e3d97bd..2eca751 100755 --- a/script/local.py +++ b/script/local.py @@ -21,6 +21,28 @@ def laser_off(): #caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 1) time.sleep(LASER_SETTLING_TIME) +def ccr(mag): + n = 1 + while n > 0: + sleep(0.5) + n = caget(mag + ":I-COMP") + + + +# Switch off magnets +def ccr(magnet): + while caget(magnet+ ":I-COMP") > 0: + sleep(0.5) + +def switchOffMagnets(magnets): + magnets = to_list(magnets) + for m in magnets: + caput(m + ":I-SET", 0.0) + sleep(0.5) + for m in magnets: + ccr(m) + + def fit(ydata, xdata = None): """