29 lines
1.3 KiB
Python
Executable File
29 lines
1.3 KiB
Python
Executable File
RANGE_OBJ = 4.0
|
|
STEP_OBJ = 0.2
|
|
RANGE_STIG = 20.0
|
|
STEP_STIG = 2.0
|
|
UPDATE_POSITION = True
|
|
AVERAGE = 1
|
|
width, height = eiger.getImageSize()
|
|
ROI = Rectangle(width/3, height/3, width/3, height/3,)
|
|
|
|
initial_state = objective.read(),obj_stig_a.read(),obj_stig_b.read()
|
|
print "Initial state:" , initial_state
|
|
|
|
def apply_pos(pos):
|
|
objective.write(pos[0])
|
|
obj_stig_a.write(pos[1])
|
|
obj_stig_b.write(pos[2])
|
|
|
|
|
|
r=scan_focus(objective, RANGE_OBJ, STEP_OBJ, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
|
|
r=scan_focus(obj_stig_a, RANGE_STIG, STEP_STIG, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
|
|
r=scan_focus(obj_stig_b, RANGE_STIG, STEP_STIG, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
|
|
r=scan_focus(objective, RANGE_OBJ, STEP_OBJ, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
|
|
r=scan_focus(obj_stig_a, RANGE_STIG, STEP_STIG, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
|
|
r=scan_focus(obj_stig_b, RANGE_STIG, STEP_STIG, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
|
|
r=scan_focus(objective, RANGE_OBJ, STEP_OBJ, roi = ROI, average = AVERAGE, update_position = UPDATE_POSITION)
|
|
|
|
final_state = objective.read(),obj_stig_a.read(),obj_stig_b.read()
|
|
print "Final state:" , final_state
|