Script execution
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
import org.apache.commons.math3.linear.Array2DRowRealMatrix as Matrix
|
||||
import ch.psi.utils.Convert.toBidimensional as mono_to_bidi
|
||||
|
||||
|
||||
|
||||
I_set = Channel("SINEG01-MSOL130:I-SET", alias = "I_set");
|
||||
I_get = Channel("SINEG01-MSOL130:I-READ", alias = "I_get")
|
||||
@@ -51,6 +51,7 @@ def ccr(mag):
|
||||
while n > 0:
|
||||
sleep(0.5)
|
||||
n = caget(mag + ":I-COMP")
|
||||
|
||||
def laser_on():
|
||||
caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 0)
|
||||
|
||||
@@ -72,11 +73,10 @@ def run_pipeline():
|
||||
I1 = 20.0
|
||||
I2 = 30.0
|
||||
dI = 1.0
|
||||
settling_time = 1.0
|
||||
settling_time = 0.0
|
||||
|
||||
# Switch off magnets
|
||||
mag = [ "SINEG01-MCRX120","SINEG01-MCRY120",
|
||||
"SINEG01-MSOL130",
|
||||
"SINEG01-MQUA140",
|
||||
"SINEG01-MQUA150",
|
||||
"SINEG01-MCRX160","SINEG01-MCRY160",
|
||||
@@ -90,13 +90,19 @@ for m in mag:
|
||||
for m in mag:
|
||||
ccr(m)
|
||||
|
||||
def br():
|
||||
ccr("SINEG01-MSOL130")
|
||||
|
||||
def ar():
|
||||
pass
|
||||
|
||||
laser_on()
|
||||
# Scan using the screen
|
||||
#r = lscan(I_set, [I_read, cam_x, cam_y], I1, I2, dI, 1.0, passes = 2, zigzag = True)
|
||||
# Scan using the BPM
|
||||
try:
|
||||
#r = lscan(I_set, [I_get, cam_x, cam_y], I1, I2, dI, 1.0, before_read = ccr)
|
||||
r = lscan(I_set, [I_get, cam_x, cam_y, cam_img], I1, I2, dI, settling_time)
|
||||
r = lscan(I_set, [I_get, cam_x, cam_y, cam_img], I1, I2, dI, settling_time, before_read = br, after_read = ar)
|
||||
finally:
|
||||
laser_off()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user