Script execution

This commit is contained in:
sfop
2016-06-27 16:39:34 +02:00
parent 72a0800a0e
commit 87ec1a40b3

View File

@@ -15,8 +15,8 @@ import ch.psi.utils.Convert.toBidimensional as mono_to_bidi
import datetime
if get_context().source == CommandSource.ui:
I1 = 20.0
I2 = 50.0
I1 = 95.0
I2 = 100.0
dI = 1.0
settling_time = 0.1
plot_image = False
@@ -24,6 +24,9 @@ if get_context().source == CommandSource.ui:
use_background = True
multiple_background = True
number_backgrounds = 5
centroid_excursion_plot = True
else:
centroid_excursion_plot = False
print I1
print I2
@@ -122,7 +125,12 @@ finally:
# 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), plot_name, False, (0,cam_img._width), (0,cam_img._height))
#hull=add_convex_hull_plot ("Centroid excursion", r.getReadable(0),r.getReadable(1), plot_name, False, (0,cam_img._width), (0,cam_img._height))
if add_convex_hull_plot:
(hx,hy)=add_convex_hull_plot ("Centroid excursion", r.getReadable(0),r.getReadable(1), plot_name)
else:
(hx,hy)= convex_hull(x=r.getReadable(0), y=r.getReadable(1))
hx.append(hx[0]); hy.append(hy[0])
# save the entry in the logbook
msg = str(r)
@@ -131,7 +139,7 @@ msg = msg + "\n\n" + r.print()
#elog("Gun solenoid current scan", msg , get_plot_snapshots())
print "DONE"
set_return(r)
set_return([r, hx,hy])
print "QUIT"