#wold be nice to print relative changes of the parameters RANGE_OBJ = 1.0 STEP_OBJ = 0.1 RANGE_STIG = 10.0 STEP_STIG = 1.0 UPDATE_POSITION = True AVERAGE = 1 width, height = eiger.getImageSize() #ROI = Rectangle(width/3, height/3, width/3, height/3,) #ROI = Rectangle(0, 0, width, height,) ROI = Rectangle(200,100,256,256) #(x0,y0,delta_x(2**n), delta_y(2**n)) ROI = Rectangle(130,74,256,256) ROI = Rectangle(180,170,256,256) initial_state = get_focus_scan_pos() print "Initial state:" , initial_state set_focus_scan_roi(ROI) r=scan_focus(objective, RANGE_OBJ, STEP_OBJ,average = AVERAGE, update_position = UPDATE_POSITION) #r=scan_focus(obj_stig_a, RANGE_STIG, STEP_STIG, average = AVERAGE, update_position = UPDATE_POSITION) #r=scan_focus(obj_stig_b, RANGE_STIG, STEP_STIG,average = AVERAGE, update_position = UPDATE_POSITION) #r=scan_focus(objective, RANGE_OBJ, STEP_OBJ, average = AVERAGE, update_position = UPDATE_POSITION) #r=scan_focus(obj_stig_a, RANGE_STIG, STEP_STIG, average = AVERAGE, update_position = UPDATE_POSITION) #r=scan_focus(obj_stig_b, RANGE_STIG, STEP_STIG, average = AVERAGE, update_position = UPDATE_POSITION) #r=scan_focus(objective, RANGE_OBJ, STEP_OBJ, average = AVERAGE, update_position = UPDATE_POSITION)# final_state = get_focus_scan_pos() print "Final state:" , final_state