Closedown
This commit is contained in:
@@ -37,7 +37,7 @@ plot_name = datetime.datetime.fromtimestamp(time.time()).strftime('%H%M%S')
|
||||
|
||||
|
||||
add_device(CamTool("camtool") , True)
|
||||
camtool.setNumberOfImages(number_images)
|
||||
camtool.setNumberOfImages(max(number_images,1))
|
||||
camtool.enableBackground (use_background)
|
||||
if use_background and not multiple_background:
|
||||
laser_off()
|
||||
@@ -95,7 +95,8 @@ r = None
|
||||
if not multiple_background:
|
||||
laser_on()
|
||||
try:
|
||||
sensors = [camtool.com_x, camtool.com_y]
|
||||
#sensors = [camtool.com_x, camtool.com_y]
|
||||
sensors = [camtool.com_x_mean, camtool.com_y_mean]
|
||||
if plot_image:
|
||||
sensors.append(camtool.image)
|
||||
r = lscan(gun_solenoid, sensors , I1, I2, dI, settling_time, before_read = br, after_read = ar)
|
||||
|
||||
@@ -53,10 +53,12 @@ class CamTool(DeviceBase):
|
||||
self.com_x_samples, self.com_y_samples = [], []
|
||||
class CamToolComX(Readable):
|
||||
def read(self):
|
||||
print "X", self.camtool.com_x_samples, mean(self.camtool.com_x_samples)
|
||||
return mean(self.camtool.com_x_samples)
|
||||
self.com_x_mean = CamToolComX(); self.com_x_mean.camtool = self
|
||||
class CamToolComY(Readable):
|
||||
def read(self):
|
||||
print "Y", self.camtool.com_y_samples, mean(self.camtool.com_y_samples)
|
||||
return mean(self.camtool.com_y_samples)
|
||||
self.com_y_mean = CamToolComY(); self.com_y_mean.camtool = self
|
||||
class CamToolComXVar(Readable):
|
||||
|
||||
Reference in New Issue
Block a user