Script execution

This commit is contained in:
sfop
2016-08-24 15:24:34 +02:00
parent c0632d62ae
commit 17bbe4e8cc

View File

@@ -9,9 +9,6 @@
# look at the centroid position (BPM or screen) downstream of the gun.
import datetime
run("camtool")
#from camtool import CamTool
from ImageStats import ImageStats
if get_context().source == CommandSource.ui:
I1 = 95.0
@@ -28,6 +25,10 @@ if get_context().source == CommandSource.ui:
else:
centroid_excursion_plot = False
from camtool import CamTool
from ImageStats import ImageStats
multiple_background = multiple_background and use_background
print "Parameters: ", I1, I2, dI, settling_time, plot_image, number_images, use_background, multiple_background, number_backgrounds
@@ -35,7 +36,10 @@ plot_name = datetime.datetime.fromtimestamp(time.time()).strftime('%H%M%S')
if get_device("image_stats") is None:
print "Instantiating camtool"
add_device(CamTool("image_stats", prefix = "cam:", latch = True, camera = "SINEG01-DSCR350"), True)
latch = True
add_device(CamTool("image_stats", prefix = "cam:", latch = latch, camera = "SINEG01-DSCR350"), True)
if (latch):
image_stats.start()
#add_device(ImageStats("image_stats", simulated_source), True)
image_stats.setNumberOfImages(max(number_images,1))
image_stats.enableBackground (use_background)