Script execution
This commit is contained in:
@@ -14,12 +14,6 @@ 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")
|
||||
|
||||
#bpm_x = Channel("SINEG01-DBPM340:X1")
|
||||
#bpm_y = Channel("SINEG01-DBPM340:Y1")
|
||||
|
||||
cam_x = Channel("SINEG01-DSCR190:profile.X_stats.com", alias = "cam_x")
|
||||
cam_y = Channel("SINEG01-DSCR190:profile.Y_stats.com", alias = "cam_y")
|
||||
|
||||
@@ -91,29 +85,22 @@ for m in mag:
|
||||
ccr(m)
|
||||
|
||||
def br():
|
||||
ccr("SINEG01-MSOL130")
|
||||
|
||||
pass
|
||||
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, before_read = br, after_read = ar)
|
||||
r = lscan(gun_solenoid, [cam_x, cam_y, cam_img], I1, I2, dI, settling_time, before_read = br, after_read = ar)
|
||||
finally:
|
||||
laser_off()
|
||||
|
||||
# take the result of the scan and do the plots
|
||||
#p = plot(r.getReadable(2), xdata=r.getReadable(1), title = "Centroid excursion")[0]
|
||||
add_convex_hull_plot ("Centroid excursion", r.getReadable(1),r.getReadable(2), "Name")
|
||||
p = plot(r.getReadable(1), xdata=r.getReadable(0), title = "Centroid excursion")[0]
|
||||
#add_convex_hull_plot ("Centroid excursion", r.getReadable(0),r.getReadable(1), "Name")
|
||||
|
||||
# save the entry in the logbook
|
||||
msg = str(r)
|
||||
msg = msg + "\nFile: " + get_context().path
|
||||
msg = msg + "\n\n" + r.print()
|
||||
elog("Gun solenoid current scan", msg , get_plot_snapshots())
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user