Script execution
This commit is contained in:
@@ -14,6 +14,15 @@ import org.apache.commons.math3.linear.Array2DRowRealMatrix as Matrix
|
||||
import ch.psi.utils.Convert.toBidimensional as mono_to_bidi
|
||||
|
||||
|
||||
I1 = 20.0
|
||||
I2 = 30.0
|
||||
dI = 1.0
|
||||
settling_time = 0.1
|
||||
plot_image = False
|
||||
number_backgrounds = 0
|
||||
number_images = 1
|
||||
|
||||
|
||||
cam_x = Channel("SINEG01-DSCR190:profile.X_stats.com", alias = "cam_x")
|
||||
cam_y = Channel("SINEG01-DSCR190:profile.Y_stats.com", alias = "cam_y")
|
||||
|
||||
@@ -64,10 +73,6 @@ def run_pipeline():
|
||||
#caget("camtool....:X_stats.com")
|
||||
|
||||
|
||||
I1 = 20.0
|
||||
I2 = 30.0
|
||||
dI = 1.0
|
||||
settling_time = 0.0
|
||||
|
||||
# Switch off magnets
|
||||
mag = [ "SINEG01-MCRX120","SINEG01-MCRY120",
|
||||
@@ -90,16 +95,17 @@ def br():
|
||||
pass
|
||||
def ar():
|
||||
pass
|
||||
|
||||
r = None
|
||||
laser_on()
|
||||
try:
|
||||
r = lscan(gun_solenoid, [cam_x, cam_y, cam_img], I1, I2, dI, settling_time, before_read = br, after_read = ar)
|
||||
sensors = [cam_x, cam_y, cam_img] if plot_image else [cam_x, cam_y]
|
||||
r = lscan(gun_solenoid, sensors , 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(1), xdata=r.getReadable(0), title = "Centroid excursion")[0]
|
||||
#add_convex_hull_plot ("Centroid excursion", r.getReadable(0),r.getReadable(1), "Name")
|
||||
#add_convex_hull_plot ("Centroid excursion", r.getReadable(0),r.getReadable(1), "Name", False, (0,cam_img._width), (0,cam_img._height))
|
||||
|
||||
# save the entry in the logbook
|
||||
msg = str(r)
|
||||
|
||||
Reference in New Issue
Block a user