Closedown
This commit is contained in:
@@ -8,10 +8,8 @@
|
||||
# change the current of the gun soleoid
|
||||
# look at the centroid position (BPM or screen) downstream of the gun.
|
||||
|
||||
|
||||
import datetime
|
||||
from camtool import CamTool
|
||||
#run("camtool")
|
||||
|
||||
if get_context().source == CommandSource.ui:
|
||||
I1 = 95.0
|
||||
@@ -23,7 +21,6 @@ if get_context().source == CommandSource.ui:
|
||||
use_background = True
|
||||
multiple_background = False
|
||||
number_backgrounds = 5
|
||||
zero_solenoids=False
|
||||
do_elog = False
|
||||
centroid_excursion_plot = True
|
||||
else:
|
||||
@@ -53,12 +50,11 @@ mag = [ "SINEG01-MCRX120","SINEG01-MCRY120",
|
||||
"SINEG01-MCRX220","SINEG01-MCRY220",
|
||||
"SINEG01-MQUA310",
|
||||
"SINEG01-MQUA320" ]
|
||||
if zero_solenoids:
|
||||
switchOffMagnets(mag)
|
||||
|
||||
switchOffMagnets(mag)
|
||||
|
||||
# add here gun phase setting see wiki page
|
||||
|
||||
|
||||
def before_sample():
|
||||
if multiple_background:
|
||||
camtool.captureBackground(number_backgrounds)
|
||||
@@ -67,8 +63,7 @@ def before_sample():
|
||||
|
||||
def after_sample():
|
||||
if multiple_background:
|
||||
laser_off()
|
||||
|
||||
laser_off()
|
||||
|
||||
r = None
|
||||
if not multiple_background:
|
||||
@@ -91,8 +86,9 @@ else:
|
||||
|
||||
# save the entry in the logbook
|
||||
gsa_log_msg = "Data file: " + get_context().path
|
||||
gsa_log_msg = gsa_log_msg + "\nImages: " + str(number_images)
|
||||
gsa_log_msg = gsa_log_msg + "\nBackground: enabled=" + str(use_background) + " multiple=" + str(multiple_background) + " number=" + str(number_backgrounds)
|
||||
gsa_log_msg = gsa_log_msg + "\n\n" + r.print()
|
||||
|
||||
if do_elog:
|
||||
elog("Gun solenoid current scan", gsa_log_msg , get_plot_snapshots())
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ print "Parameters: ", phi1, phi2, dphi, settling_time, plot_image, number_images
|
||||
|
||||
plot_name = datetime.datetime.fromtimestamp(time.time()).strftime('%H%M%S')
|
||||
|
||||
multiple_background = multiple_background and use_background
|
||||
|
||||
# Switch off magnets
|
||||
mag = [ "SINEG01-MCRX120","SINEG01-MCRY120",
|
||||
|
||||
Reference in New Issue
Block a user