def collect_pixel(self, pixel_i, frame_i, k,j,i):
#print pixel_i, k,j,i
t0 = time.time()
#px_data = np.random.rand()
#px_data = t0 - self.prev_px
x_hw = self.stage.settings.x_position.read_from_hardware(send_signal=False)
y_hw = self.stage.settings.y_position.read_from_hardware(send_signal=False)
theta = np.pi/10. * frame_i
x = x_hw*np.cos(theta) - y_hw*np.sin(theta)
y = x_hw*np.sin(theta) + y_hw*np.cos(theta)
px_data = np.sinc((x-50)*0.05)**2 * np.sinc(0.05*(y-50))**2 #+ 0.05*np.random.random()
#px_data = (x-xhw)**2 + ( y-yhw)**2
#if px_data > 1:
# print('hw', x, xhw, y, yhw)
self.display_image_map[k,j,i] = px_data
if self.settings['save_h5']:
self.test_data[frame_i, k,j,i] = px_data
time.sleep(self.settings['pixel_time'])
#self.prev_px = t0
base_raster_scan_test.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录