SerialEM HowTo: Speed Up

Chen Xu

$BrandeisEM: ~emdoc-xml/en_US.ISO8859-1/articles/SerialEM-howto:speed-up/article.xml 1 2014-09-22 10:58:12 xuchen Exp$

For single particle data collection in automatic fashion, the speed becomes significant. If for each target position we can save a few seconds, total amount of time saved for 24 hours session is then not negligible. Efficiency is a real deal in this case.

For tomography data collection, efficiency is also in the consideration. One of the time consuming actions is to refine eucentricity for each target point before tilting series starts.

In this document, I discussed a few places where we might be able save some time.

You can also get pdf version of this document here.


Table of Contents
1 Recent Change related to K2 camera
2 Speed up using Modulo function
3 Rough positioning, but faster
4 Speed Up Eucentricity step for tilting series

1 Recent Change related to K2 camera

When it takes dose-fractionation series, or we call movie stacks, DM could take quite some time from start of exposure to the finish of writing data onto disk. The most time consuming part is the step of "preparing stack" by DM. Basically, the frames are first saved to SSD drive temporarily, and then are loaded back to memory and applied any action like aligning etc., before final prepared stack being saved to disk. At least this was the case for DM pre 2.30. Since 2.31, the preparing step is slightly different. But the total time for taking a movie stack is still significant.

However, in either case above, DM could be available to take single shot soon after exposure finishes and BEFORE total stack is done written. This provides a comfortable time window for SerialEM to perform some tasks, which saves quite some time. For example, we can ask SerialEM to move to the next target of stage position, fix Eucentricity, center the beam, autofocus and so on. Thus, we can take another movie stack as soon as previous one is finished, since everything else is ready.

The change on SerialEM side is that it doesn't have to wait to have total sum of the stacks return to SerialEM interface. Therefore, SerialEM can be freed up for some preparing tasks for next movie stack exposure. This is done by a new macro command


EarlyReturnNextShot #

This only works for K2 camera with dose-fractionation acquisition. The argument can be:


EarlyReturnNextShot 0
Record

2 Speed up using Modulo function

In single particle application, for each target position, we usually do a few things: centering beam, autofocusing, waiting for drift etc.. However, it is often found the local area are pretty much the same and we don't really need to perform each of these actions for every target position. It is quite OK to skip these actions for a few positions nearby and just take a shot. In SerialEM, this is done by using a macro function Modulo. Lets take a look at the following macro:

Example 1. LD_Modulo.txt


MacroName LD_Modulo

# point to do things (5,10,15...), skip between
point = 5

RealignToNavItem 1
Call ZeroIS-quick

# find index number for current acquire
ReportNavItem
echo Acquiring Item is $navAcqIndex
remainder = modulo $navAcqIndex $point

# find GroupStatus for current item. It is 1 for first 
# acquire item in the group.
# It is recommended to have a new group for each mesh.
ReportGroupStatus
GS = $reportedValue1

Loop 1
if $remainder == 0 OR $GS == 1
    # CenterBeam, assume autocenter policy has been setup
    AutoCenterBeam
    # change focus target
    Call CycleTargetDefocus
    # actual focus, twice
    G
    G
else
    break
Endif 
Endloop

R
S

One thing to be mentioned in above example is


   $navAcqIndex

This is an index number of the item with "A" - Acquire flag in navigator window. The idea is to do a few things only for very first "A" item and the period "A" item, and all the other item points are skipped. This skipped points are only to take exposure.

As you can see, this would speed up things a lot.


3 Rough positioning, but faster

SerialEM's realign routine works well, very robust. It leaves certain amount of Image Shift in the end, for accuracy purpose. As I mentioned before, for high resolution images, we better off get rid of the Image Shift. We can do this using a macro as following:

Example 2. ZeroIS.txt


MacroName ZeroIS
# 
# Align one more round and get rid of IS 
# using the last image as ref

Copy A P
ResetImageShift
Loop 2
V
AlignTo P
ResetImageShift
EndLoop

This macro basically uses stage shift to compensate the image shift value. Due to inaccuracy of stage movement, we usually need to iterate. In this case, we loop twice. However, this involves taking single shots twice, which consumes some time too.

In the case which we don't need to be on target exactly, we can replace this macro with a quick version.

Example 3. ZeroIS-quick.txt


MacroName ZeroIS-quick
# position off limit in micron
limit = 0.3

ReportImageShift
X = $reportedValue1
Y = $reportedValue2
IS = sqrt $X * $X + $Y * $Y

Loop 1
If $IS <= $limit
   ClearAlignment
Else 
   ResetImageShift
Endif
EndLoop

This macro doesn't take any shot. Instead, it either clears the alignment and image shift or just compensates the image shift using stage shift for once, based on the Image Shift limit you set.


4 Speed Up Eucentricity step for tilting series

The bi-directional way of collecting tilting series makes the procedure more robust. Unless it is found that 1st half causes significant volume change, I would stay with this method over the one-way method.

Still, for reliable data collection, it is important that specimen is at eucentricity. One can choose to do this from inside setup dialog window or from pre-action if you run from navigator. Refine eucentricity is robust, but it takes time too. Alternatively, we can use tilt beam image pairs to adjust Z height, like in SerialEM-howto:PostioningZ.

Here is the little macro you can run before you start your tilting series.

Example 4. PrepTS.txt


MacroName PrepTS
# a macro to adjust Z using autofocusing and ZeroIS
# similar with Eucenticity 3 but faster and without wobbling the stage

V
Copy A P
Call Z_byV
Loop 2
V
AlignTo P
ResetImageShift
EndLoop

If your target is an point item in navigator, you need to realign to this item point first before running this macro. If you do "Acquire at points ...", you check "realign" and also run this macro from Pre-action.

With this, you don't check "refine" from setup dialog window. This will bring your target at specimen to close to eucentricity in just a few seconds!