Closedown

This commit is contained in:
sfop
2016-06-28 15:15:03 +02:00
parent 47fd5df0f7
commit c5e75bad33
+18 -14
View File
@@ -14,6 +14,9 @@ import org.apache.commons.math3.linear.Array2DRowRealMatrix as Matrix
import ch.psi.utils.Convert.toBidimensional as mono_to_bidi
import datetime
zero_solenoids=False
do_elog = False
if get_context().source == CommandSource.ui:
I1 = 95.0
I2 = 100.0
@@ -104,17 +107,19 @@ mag = [ "SINEG01-MCRX120","SINEG01-MCRY120",
"SINEG01-MCRX220","SINEG01-MCRY220",
"SINEG01-MQUA310",
"SINEG01-MQUA320" ]
#for m in mag:
# caput(m + ":I-SET", 0.0)
#for m in mag:
# ccr(m)
if zero_solenoids:
for m in mag:
caput(m + ":I-SET", 0.0)
for m in mag:
ccr(m)
# add here gun phase setting see wiki page
def br():
pass
def ar():
pass
pass
r = None
laser_on()
try:
@@ -123,9 +128,7 @@ try:
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]
#hull=add_convex_hull_plot ("Centroid excursion", r.getReadable(0),r.getReadable(1), plot_name, False, (0,cam_img._width), (0,cam_img._height))
# take the result of the scan and generate convex hull plot
if centroid_excursion_plot:
(hx,hy)=add_convex_hull_plot ("Centroid excursion", r.getReadable(0),r.getReadable(1), plot_name)
else:
@@ -133,13 +136,14 @@ else:
hx.append(hx[0]); hy.append(hy[0])
# 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())
if do_elog:
msg = str(r)
msg = msg + "\nFile: " + get_context().path
msg = msg + "\n\n" + r.print()
elog("Gun solenoid current scan", msg , get_plot_snapshots())
print "DONE"
set_return([r, hx,hy])
print "QUIT"