6 Integrate Z_byG into Main LD Macro

We not only can quickly move a mesh to roughly eucentric height, but also can adjust Z height at each target location. In single particle application, this means to change Z at each spot or hole. This will help to keep the microscope parameters including objective lens value at very close conditions for all the target location across the whole mesh.

Now lets see what the main macro looks like if we plug Z_byG in.

Example 6. LD.txt


MacroName LD
# the main macro to run at each target location which is usually defined 
# as point items in a map.

## Realign to
RealignToNavItem 1
# save the final image as reference in buffer P
Copy A P

## Center Beam
T
CenterBeamFromImage
T

## adjust Z
# adjust to eucentric Z
Call Z_byG

## refine X,Y position (X,Y moved after Z change) and clear out IS
Call AlignToP

## Focus
G
G

## Drift Control
Call Drift

## Record and save
R
S