2 Using Macro, for a single point

Fortunately, SerialEM's macro provides a way to run the above multiple steps by one simple click. Below is an example of a macro named ZeroIS.

Example 1. ZeroIS.txt


MacroName ZeroIS
# a macro to "drag" the stage to target point and clear out
# any Image Shift

shot = V

Copy A P
ResetImageShift

Loop 2
  $shot
  AlignTo P
  ResetImageShift
EndLoop

After dragging the feature spot to the center of CCD in an image view, running this macro will move the stage to the spot, fairly accurately. This is a very handy little macro.

It is worth explaining a little to the actions in this macro so that we can understand how the SerialEM works.

After dragging the image to the new position where the interested spot is at the center of CCD view, the difference between old and new positions in the image view results in a value of ImageShift(IS). At the same time, the microscope state has been changed to reflect this IS value by involving tilting the beam. If one takes a shot with this IS value, the spot will end up in the center of CCD view. However, this is done by "zigzagging" the beam, NOT by actually moving the stage to the spot. This is fine for tomography application. In fact, this is used extensively in tomography tilt series data collection and montaging. However, for high resolution single particle data collection, we want to avoid any beam tilt if possible for final image.

The line in the macro

Copy A P

copies the image in buffer A to buffer P. This image is a "centered" one after dragging. Since buffer P is beyond the rolling buffer range, it is put there as reference for later image aligning.

ResetImageShift

clears out IS value to the scope. And, it compensates the ImageShift by applying the same information to the stage. Therefore, after this line, the stage will move close to the target position, even it is not precisely on it, yet.

Loop 2
  $shot
  AlignTo P
  ResetImageShift
EndLoop

takes a shot, and align this newly taken image to the "centered" reference image previous copied in buffer P, and compensates the IS by moving the stage. Iterating a couple of times can get to the position close enough to the target. This works very well for the magnification around M and SA range but not too high like 60,000X and above.