Closedown
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
|
||||
import datetime
|
||||
|
||||
use_bpm = True
|
||||
|
||||
if get_context().source == CommandSource.ui:
|
||||
I1 = 95.0
|
||||
I2 = 100.0
|
||||
@@ -35,12 +37,15 @@ print "Parameters: ", I1, I2, dI, settling_time, plot_image, number_images, use_
|
||||
plot_name = datetime.datetime.fromtimestamp(time.time()).strftime('%H%M%S')
|
||||
|
||||
|
||||
latch = True
|
||||
if get_device("image_stats") is None:
|
||||
print "Instantiating camtool"
|
||||
add_device(CamTool("image_stats", prefix = "cam:", latch = latch, camera = "SINEG01-DSCR350"), True)
|
||||
if (latch):
|
||||
image_stats.start()
|
||||
if (use_bpm):
|
||||
add_device(BpmStats("image_stats", "SINEG01-DBPM340"), True)
|
||||
else:
|
||||
latch = True
|
||||
if get_device("image_stats") is None:
|
||||
print "Instantiating camtool"
|
||||
add_device(CamTool("image_stats", prefix = "cam:", latch = latch, camera = "SINEG01-DSCR350"), True)
|
||||
if (latch):
|
||||
image_stats.start()
|
||||
#add_device(ImageStats("image_stats", get_simulated_source(image)), True)
|
||||
|
||||
image_stats.setNumberOfImages(max(number_images,1))
|
||||
|
||||
@@ -102,7 +102,7 @@ else:
|
||||
(hx,hy)= convex_hull(x=r.getReadable(0), y=r.getReadable(1))
|
||||
hx.append(hx[0]); hy.append(hy[0])
|
||||
|
||||
print "OK"
|
||||
|
||||
# save the entry in the logbook
|
||||
gsa_log_msg = "Data file: " + get_context().path
|
||||
gsa_log_msg = gsa_log_msg + "\nImages: " + str(number_images)
|
||||
@@ -111,6 +111,7 @@ gsa_log_msg = gsa_log_msg + "\n\n" + r.print()
|
||||
if do_elog:
|
||||
elog("Gun solenoid current scan", gsa_log_msg , get_plot_snapshots())
|
||||
|
||||
_=[r, hx, hy]
|
||||
set_return([r, hx, hy])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user