The SerialEM Script Repository

Focus Pair

Edit Delete


Name Focus Pair
Category High-Level Functions
Language SerialEM Scripting
Description Acquires and saves a focus pair
Author Juha Huiskonen
Website link

Version History

Version 1.0


Upload date March 01, 2018
Download count 540
SerialEM version ≥ (untested)



Preview image is used for pre-exposure (which we believe is advantageous to reduce beam induced drift due to charging effects) and for final centering of the beam. The first image is taken and defocus defined by "defocus target" and the second image is taken 3 um further from focus. If you don't need focus pairs, simply remove or uncomment the relevant lines.


This code can be shared and adapted under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License (