def getSummedData(self, c, num_images = 1):
''' Get the counts with the vertical axis summed over. '''
print 'acquiring: {}'.format(self.getAcquiredData.__name__)
yield self.lock.acquire()
try:
print 'acquired: {}'.format(self.getAcquiredData.__name__)
images = yield deferToThread(self.camera.get_acquired_data, num_images)
hbin, vbin, hstart, hend, vstart, vend = self.camera.get_image()
x_pixels = int( (hend - hstart + 1.) / (hbin) )
y_pixels = int(vend - vstart + 1.) / (vbin)
images = np.reshape(images, (num_images, y_pixels, x_pixels))
images = images.sum(axis=1)
images = np.ravel(images, order='C')
images = images.tolist()
finally:
print 'releasing: {}'.format(self.getAcquiredData.__name__)
self.lock.release()
returnValue(images)
评论列表
文章目录