SerialEM HowTo: Positioning Z

Chen Xu

$BrandeisEM: ~emdoc-xml/en_US.ISO8859-1/articles/SerialEM-howto:positioningZ/article.xml 3 2014-10-04 11:43:45 xuchen Exp$

SerialEM is a powerful program for EM data collection. Although it is maybe originally designed for tomography data collection, it is equally powerful and flexible for single particle EM tasks.

For tomography data collection, it makes very good sense for specimen to be at eucentricity so that the image feature of the interest doesn't shift too far away when tilting the stage. In single particle application that doesn't involve tilting the specimen, to be at eucentricity is also a good idea. There are a couple of reasons for that. Microscope electronic optical performance would be optimal when specimen is at eucentricity. And if the specimen is always at eucentricity, then the optical condition for imaging at different date and time will be close enough that the data can be merged safely.

It is not hard to adjust the specimen to eucentricity after specimen rod insertion. However, the grid is usually not that flat, you can easily find the specimen is no longer at eucentricity level if moved to a new location that is a couple of meshes away. Moreover, even within the same mesh of a 400M gird, the specimen height can be very different from this side to the other. Therefore, for best data quality, it is required that specimen is to be adjusted to eucentricity at each record location. It is not easy to do that.

One of the manual ways to adjust to eucentricity is to adjust Z while wobbling the stage tilt until the image feature shift is minimal. Program like SerialEM can even do it automatically, by comparing the image feature disparity of tilt pairs. Both ways involve stage tilt. This introduces two problems. One is time consuming. The total time spent for eucentricity for all record locations will be significant. The other one is technical - for sided entry cryo holder like Gatan 626, tilting stage will inevitably cause bubbling again to the quieted LN2 surface in the dewar of the holder.

In this document, I want to show you how to use macros of SerialEM to go to eucentricity conveniently, without wobbling the stage.

You can also get pdf version of this document here.


Table of Contents
1 The Background
2 Standard Focus
3 Determine Eucentric Focus and Set to it
4 Calibrate Standard Focus
5 Adjust Z to Eucentric Height
6 Integrate Z_byG into Main LD Macro
7 Extra Note

1 The Background

On a TEM, three things are closely related and dependent on each other - Specimen Height, Focus and Beam Tilt Pivot-Points. Focus an image really means to focus an image of specimen at a particular height. For a specimen at a different height, one can still focus the image, but the Objective Lens will at different strength.

If a specimen is at Eucentric Height, it is also called at Eucentricity. And if image of it is focused, we call the objective lens at Eucentric Focus. Usually, we adjust beam tilt pivot-points relative to Eucentric Focus. This step is part of microscope alignment procedure. On a Tecnai TEM, we usually do it from Direct Alignment for a quick check.

After beam-tilt povit points (X,Y) are set at Eucentric Focus, if an image feature is not overlapped for + and - tilt beams, then it means either specimen is not at eucentric height or the objective lens is not at Eucentric Focus, or both. If we do know the specimen IS at Eucentric Height, we can then determine focus and adjust focus to any target level by studing the disparity of the same image feature under the image pairs of tilted beams. This is the method used by SerialEM and Leginon to adjust focus level. On the other hand, if we set the objective lens to Eucentric Focus and we can also estimate and adjust specimen to Eucentricity by utilizing the same image pair disparity. This is what I am going to show in this document. As you can see, this method doesn't involve any stage tilt.


2 Standard Focus

On a Tecnai microscope, the defocus display value on TUI is a relative number, because it can be changed by ResetDefocus without the actual objective lens current being changed.

However, there is a thing called Standard Focus. Its value is directly related to objective lens current, regardless what the display defocus value is. Therefore, sometimes, it is also called Absolute Focus. The term Absolute is perhaps slightly misleading, because it depends on scope alignment. When Eucentric Focus button on the right pad is pressed, the Standard Focus or Absolute Focus has value 0. In another word, it depends on Focus Preset for that specific magnification during column alignment procedure.

In a perfect world, the value of Standard Focus at Eucentric Focus should be 0. But in reality, this value can be off by a small or large number. The alignment might have not been done accurately, and the it might not be updated, due to, for example, a CompuStage repair. However, for a fixed alignment, a Standard Focus value corresponds to an unique objective lens current. We can utilize it to set objective current to a specific level, conveniently.

As you can see, if specimen is at Eucentricity and precisely focused, the Standard Focus value under this condition is corresponding to Eucentric Focus.

Note: Standard Focus property is hidden from TUI interface. One can not see its value and use it. However, we can do all that via scripting interface which SerialEM uses to control the microscope.


3 Determine Eucentric Focus and Set to it

The key is to determine what the value of Standard Focus at Eucentric Focus is for a magnification and how to use this value to set the objective lens from anywhere to the Eucentric Focus when needed. And this needs to be done at any one of the multiple magnifications.

SerialEM provides two commands for this. They are ReportFocus and SetStandardFocus #. Lets take a look how to use them.

If we first make sure the specimen is at eucentricity and we precisely focus the image, we can then get the Standard Focus value for Eucentric Focus by running a SerialEM macro command ReportFocus.

Example 1. ReportFocus


MacroName ReportFocus
# find the standard value at the current objective condition.

ReportFocus

The above macro command outputs a value like -0.000038. This value defines the objective strength specifically. In this case, it is linked with Eucentric Focus. With this value, we can set the objective lens to a Eucentric Focus by running another SerialEM macro command called SetStandardFocus, at any time.

Example 2. SetStandardFocus


MacroName SetStandardFocus
# set objective to a specific level

Std_Focus = -0.000038
SetStandardFocus $Std_Focus

As you have probably realized, these two commands can be used to determine and later reset to an (any) objective lens condition. Eucentric Focus is just one special case.

Since Feb 7, 2013, SerialEM beta version has provided a calibration Standard Focus to allow one record Standard Focus values for Eucentric Focus at all magnifications and save them as part of calibration. This Standard Focus calibration menu replaces the old Standard LM Focus which only allows for LM mag range. There is also a new macro command SetEucentricFocus to retrieve a value for current magnification and set objective lens to. These two new features make our task more conveniently.


4 Calibrate Standard Focus

With SerialEM latest version, one can calibrate this value easily for a specific magnification. Here are the steps.

  1. Adjust specimen to true eucentricity from menu Task → Eucentric Both.

  2. Precisely focus the specimen. You can do it manually, but it is perhaps better to use Autofocus a couple of times until the reported focus value is close to 0.

  3. Calibration → Aotufocus & Focus → Standard Focus

For convenience, one can run a macro like the following one.

Example 3. CalEucentricFocus.txt


MacroName CalEucentricFocus
# a macro to calibrate EucentricFocus
# 2014-10-04 12:13:23
# assume 1) Specimen is at Eucentricity 2) Target Focus is set to 0

NormalizeLenses 2
Delay 1
G
G
G
CalEucentricFocus

Note: This StandardFocus values are calibrated for global use. However, due to possible different scope alignment, it is the best to calibrate this for your session to get it accurate. This calibration as user is not stored in ShortTerm file so you will have to redo it if you start SerialEM again. Hopefully, this macro makes this easy.


5 Adjust Z to Eucentric Height

Here is an example macro to adjust Z height after resetting objective lens and measuring defocus.

Example 4. Z_byG.txt


MacroName Z_byG
##############################
# Z_byG.txt
# by Chen Xu, Mod. Feb. 8, 2013
##############################
#
# a macro to adjust the eccentric center using beam tilted pairs.
# It uses Autofocus to measure the focus and adjust Z instead.
#
# assume there are calibration entries for Calibration - Standard Focus

#==================
# set object lens 
#==================
SetEucentricFocus
NormalizeLenses 2
Delay 1

#===========
# Adjust Z
#===========
Loop 2
Autofocus -1
ReportAutofocus 
t = -1 * $reportedValue1
MoveStage 0 0 $t
echo --> Z moved $t micron 
EndLoop
#=== end ====

The current develop (beta) version of SerialEM allows to use View beam to do autofocus. This is very helpful, especially in the situation one wants to quickly adjust specimen to roughly eucentrici height without exiting from Low Dose mode. For example, when at a new mesh, running following macro while in Low-Dose mode can bring that mesh to close to eucentricity easily and without wobbling the stage.

Example 5. Z_byV


MacroName Z_byV
##############################
# Z_byV.txt
# by Chen Xu, Oct  23, 2010, 
# Last modified: 2014-10-06 12:21:26
##############################
# 

#====================================
# for defocus offset of V in Low Dose, save it
# ===================================
GoToLowDoseArea V
SaveFocus

#==================
# set object lens 
#==================
SetEucentricFocus
NormalizeLenses 2
Delay 1

#===========
# Adjust Z
#===========
Loop 2
Autofocus -1 1
ReportAutofocus 
Z = -1 * $reportedValue1
MoveStage 0 0 $Z
echo Z has moved --> $Z micron 
EndLoop

#=========================================
# restore the defocus set in V originally
# ========================================
RestoreFocus

The real difference of this macro from the previous one is the 1 as the last argument of line of measuring focus. It means to use V instead of F in Low Dose mode.

Autofocus -1 1

Note: There are two new macro commands in above updated macro - SaveFocus and RestoreFocus. One hidden beauty for these two commands is that they are at macro control level. SaveFocus saves a focus value and this value gets restored even the macro is stopped before line of RestoreFocus. This way, with large V focus offset, there is no risk to get scope objective lens to wrongly high value, even the macro is interrupted in the middle of "adjusting Z".


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

7 Extra Note

It is worth mentioning that one likely needs to calibrate the Standard Focus separately for GIF camera.

When specimen is at Eucentricity, if objective is precisely focused for one camera, it is also focused for all the pre-GIF camera. Indeed, we don't need to worry for different cameras which are at different level post-column. But this is no longer the case for a post-GIF camera. For a GIF camera, due to extra lens system of GIF, one have to focus differently so that it is focused at GIF camera position. This is why we have to calibrate the Standard Focus separately.

As current version of SerialEM, this Standard Focus calibration doesn't have camera ID. It only has magnification index. One has to have two different calibration files, if there are some overlapping magnifications needed for both camera. Hopefully, David will allows the camera ID included for this in the next version of SerialEM.

Usually, the calibration is accurate enough to get specimen close to eucentric quickly, and within a few microns. If you want to be more accurate, or you might want to do it at higher mag like that of record mag. It is the best to calibrate this value yourself in your session, as an user, because you might be using a alignment parameter slightly different from what was when calibrate globally.