The SerialEM Script Repository

Map grids (advanced)

Edit Delete


Name Map grids (advanced)
Category High-Level Functions
Language SerialEM Scripting
Description This script allows the user to choose between mapping single or multiple grids from the auto loader as well as just mapping the grid that is currently on the compustage.
Author Christian Dienemann

Version History

Version 1.0


Upload date October 26, 2022
Download count 92
SerialEM version ≥ 3.9




- Mapping grids from autoloader (defined by start/end slot) or what is on the compustage
- Skips empty autoloader slots
- Option to determine eucentricity of the grid before mapping
- Opens a new navigator and saves it to a user defined location if there is no navigator open (uses currently open navigator otherwise)
- Grid maps are saved in separate files per grid
- A jpg snapshot is saved after mapping a grid (for visual inspection during the mapping)


At the top of there script there are a few variables to configure:
mag_check : checks whether this mag is set before starting (e.g. a mapping imaging state)
montage_x : number of pieces in X to acquire
montage_y : number of pieces in Y to acquire
overlap : overlap between tiles in pixels (!)
sd_threshold : image value standard deviation threshold that defines whether there is enough contrast in an image to be used for the rough eucentricity task
default_dir : the default directory to be set when there is no navigator open

It might be necessary to experiment a bit with montage_x/y and the overlap setting to adjust to your imaging conditions.


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