Setting Up SerialEM
The Packages and their Contents
Versions of the DigitalMicrograph Plugin and Compatibility with Leginon
Running the Installer.
Upgrading to a New Version.
Permissions and Running as Administrator.
Determining IP Addresses on a Shared Network
Defining an Environment Variable.
Shortcuts, Command Line Arguments, and Administrator mode.
A Minimal Setup Procedure
Starting with a Generic Properties File
Connecting with an FEI Microscope through Plugin and Server
Yes, You Need a Network Connection between the Computers
Setting Up the Plugin and Server
Moving an Existing Installation from an FEI Computer to a 64-bit Computer
Upgrading to the New Plugin and Server from SerialEM 3.4.
Running 64-bit SerialEM on a 64-bit FEI Computer
Initial Camera Setup
Camera Configuration for Image Orientation
General camera related parameters
For a Tietz camera
To connect to DigitalMicrograph through a socket interface
For a K2 camera in particular
For a Direct Electron direct detection camera
For a Falcon 2 camera that can save intermediate frames, under original scripting interface
For a Falcon 2 camera under the new advanced scripting interface
For a Falcon 3 camera
To use a GPU for aligning Falcon frames in SerialEM
For accessing a JEOL camera or STEM signals
For accessing a Tietz camera remotely
Bad dialog sizes.
Initial Actions and Other Special Features for Hitachi HT7700
Checking the Magnification Table and Calibrating Neutral IS Values
Measuring Relative Gain Factors for Eagle, Tietz CMOS, or other Cameras
Tuning Timing of Gatan Camera with Two Shutters
Measuring Timing of Non-Gatan Camera or Gatan Camera with One Shutter
Setting up Tietz or Eagle Camera Binning Offsets
Assessing Standard Focus for Low Mag Mode
Calibrating Image Shift and Pixel Size
A script for image shift and pixel size calibrations
Measuring further relative rotations and pixel sizes by aligning images
Absolute rotation angle
Other Microscope Calibrations
Setting Up X Ray Removal from Dark References
Measuring Camera Gain
Stage and Imaging Stretch
Setting Up STEM
Obsolete Tuning of Camera Timing
Setting Up for a Separate Voltage
Setting Up to Use Nanoprobe TEM on FEI Scopes
Adding an NVIDIA card to a K2 Computer
The Packages and their Contents. The files needed to run SerialEM consist of executable programs and libraries, which are distributed in a package SerialEM_3-x-x.exe, and configuration and data files, some of which are obtained from a 'framework' package. The program itself should be installed in a folder C:\Program Files\SerialEM; this is the location where the package unpacks by default. The configuration and data files are also placed in this folder under Windows 2000 and XP, but under Windows 7 and Server 2008 they need to be placed in a folder C:\ProgramData\SerialEM instead. For the latter systems, if you received a custom framework file, it should be set up to unpack in C:\ProgramData, but if not, you should change 'Program Files' to 'ProgramData' before unzipping.
The SerialEM_3-x-x.exe package will create a subfolder SerialEM_3-x-x under C:\Program Files\SerialEM with the following files (not all included in a 64-bit SerialEM package):
|SerialEM.chm||the help file|
|Microsoft.VC90.CRT, Microsoft.VC90.MFC, Microsoft.VC90.OPENMP||Folders with DLL's and manifests for running the program compiled with Visual Studio 2008|
|FEIScopePlugin.dll||A plugin for communicating with an FEI microscope locally or remotely|
|FEI-SEMserver.exe||A server that is copied to a remote FEI microscope computer and run there|
|JeolScopePlugin.dll||A plugin for communicating with a JEOL microscope|
|HitachiPlugin.dll||A plugin for communicating with a Hitachi HT7700 microscope|
|ShMemSEMserver.exe||A server for shared memory values that is copied to the HT7700 computer when running on another computer|
|SerialEMCCD.dll||the plugin to DigitalMicrograph for GMS 1.x|
|SEMCCD-GMS2.0-32.dll||the plugin to DigitalMicrograph for 32-bit GMS 2.0 - 2.2|
|SEMCCD-GMS2.3-32.dll||the plugin to DigitalMicrograph for 32-bit GMS 2.3 and above|
|SEMCCD-GMS2.2-64.dll||the plugin to DigitalMicrograph for 64-bit GMS 2.0 - 2.2|
|SEMCCD-GMS2.30-64.dll||the plugin to DigitalMicrograph for 64-bit GMS 2.30|
|SEMCCD-GMS2.31-64.dll||The plugin to DigitalMicrograph for 64-bit GMS 2.31 and above|
|SerialEMCCDps.dll||a DLL for communicating with the plugin for GMS 1.x|
|SEMCCDps-GMS2-32.dll||a DLL for communicating with the plugin for both 32-bit and 64-bit GMS 2|
|SEMCCDps-GMS2-64.dll||a DLL for communicating with the plugin for 64-bit GMS 2|
|FrameGPU.dll||A DLL for using the GPU of an NVIDIA card for doing frame alignment in the plugin to DM|
|register-GMS1.bat||a batch file for copying the plugin and registering both DLL's for GMS 1.x|
|register-GMS2-32.bat||a batch file for copying the plugin and registering both DLL's for 32-bit GMS 2|
|register-GMS2-64.bat||a batch file for copying the plugin and registering three DLL's for 64-bit GMS 2|
|b3dregsvr32.exe||Program run by the batch file for registering the plugin for 32-bit and 64-bit GMS 2|
|b3dregsvr64.exe||Program run by the batch file for registering the plugin for 64-bit GMS 2|
|FocusRamper.exe||A COM executable for doing dynamic focus with FEI STEM|
|register-Ramper.bat||A batch file for registering the FocusRamper on a remote microscope|
|JeolCamPlugin.dll||A plugin for accessing a JEOL camera or JEOL STEM signals on some scopes|
|JEOL-SEMCamServer32.exe||A server that is copied to a remote JEOL PC for accessing JEOL camera or STEM signals|
|JEOL-SEMCamServer64.exe||A camera server that is copied to a remote JEOL PC running 64-bit JEOL software|
|TietzPlugin.dll||A plugin for accessing Tietz (TVIPS) cameras|
|Tietz-SEMServer.exe||A camera server that is copied to a remote PC running a Tietz camera|
|install.bat||a batch file for copying appropriate files to the folder above and registering needed items|
There are two distinct kinds of plugins here. One is the plugin to DigitalMicrograph, which runs when DM loads it from one of its Plugins folders. The other is the collection of microscope and camera plugins to SerialEM. SerialEM tries to load any file whose name ends in 'Plugin.dll' from the same folder as the executable.
The files that come from a framework extract to either C:\Program Files\SerialEM
(Windows XP) or C:\ProgramData\SerialEM (Windows 7 and later) and include:
SerialEMproperties.txt - the Properties file, read by SerialEM, edited by hand
SerialEMcalibrations.txt - an empty calibrations file, read and written by SerialEM
SEMsystemSettings.txt - a default settings file for users that do not have settings yet
SerialEM.lnk - a shortcut to start SerialEM with the right settings, once setup is complete
UserSettings - a folder that can contain several subfolders, each providing a set of default settings for SerialEM for different users/applications
UserSettings\Setup - a folder for SerialEM default settings for installation and calibration
UserSettings\Setup\Setup SerialEM.lnk - a shortcut to start SerialEM with using the default settings for installation and calibration (can be copied anywhere)
UserSettings\Setup\SerialEMsettings.txt - a settings file for installation and calibration
If you did not get a 'framework' package already customized for your scope, the Properties file in the SerialEM folder is incomplete and should be edited to incorporate camera and magnification information, as indicated in Starting with a Generic Properties File. See this section also for instructions on modifications needed under Windows 7/Server 2008 and with GMS 2.x.
Versions of the DigitalMicrograph Plugin and Compatibility with Leginon. The version number on the SEMCCD plugin does not need to match the GMS version exactly; the versions provided in the package are compatible with the full range of GMS versions. Specifically, the 32-bit version built with GMS 2.30 works with GMS 2.31 and 2.32; the 64-bit version built with GMS 2.31 works with GMS 2.32 and GMS 3.
Leginon uses the SerialEM plugin for communicating with K2 cameras. However, it is generally compatible with any plugins distributed in SerialEM 3.5 or 3.6, because it does not rely on the newest features in these plugins. New versions of the plugin are always backwards compatible; i.e., they will work with older versions of connecting software (SerialEM or Leginon) that are unaware of new features. SerialEM, however, does use all the new features in newer plugins, so it will expect to find the plugin version that it is distributed with. Thus, if both SerialEM and Leginon are on the system, there should only be one version of the plugin, and it should be the version distributed with SerialEM. The SerialEM installer will remove any existing plugins from
Running the Installer. For initial installation or upgrading to a new version, simply click on 'install.bat' in the SerialEM_3-x-x subfolder. In Windows 7/Server 2008 you will need to right click and select 'Run as Adminstrator'. If you have a Gatan camera, make sure that DigitalMicrograph is not running. The installer does the following:
It will clean up DLL's and help files from previous versions then copy an appropriate subset of the files into the upper folder (SerialEM). In Windows 2000, the individual Microsoft DLL's will be copied instead of their folders.
On an FEI scope, you will be asked if you want to install the module for doing dynamic focus in STEM. If so, it will copy FocusRamper.exe up and register it.
The installer will try to deduce what kind of microscope it is running on, and copy the appropriate plugin file to the upper folder. If there is no evidence of what kind of scope is being run, you will be asked if you want to install a plugin for an FEI scope or a Hitachi scope. If there is no apparent microscope installation, but a plugin file is already present in the upper folder, then it will copy the new version of that plugin up.
The Tietz plugin is copied up unconditionally, and one for running JEOL cameras is copied if it is already present.
If you have a Gatan camera, the installer will detect whether you have GMS 1.x or a 32-bit or 64-bit version of GMS 2.x or 3.x, and copy just the needed DLL's and register-GMSx.bat file. It will tell you which version it found and remind you that DigitalMicrograph should not be running. Make sure it detected the right version.
After you hit a key, it will copy the DM plugin to the Gatan Plugins folder (C:\Program Files\Gatan\DigitalMicrograph\Plugins in GMS 1.x, C:\Program Files\Gatan\Plugins for GMS 2 32-bit, and C:\ProgramData\Gatan\Plugins for GMS 2 64-bit) and register the DLL's; this should result in 2 or 3 message boxes saying that registration succeeded. For GMS 2, the plugin will be renamed to remove the GMS minor version number before it is copied (e.g., SEMCCD-GMS2-32.dll).
At the end, if it thinks you are accessing an FEI or Hitachi scope remotely, it will tell you to copy FEI-SEMserver.exe or ShMemSEMserver.exe to the scope computer. The first time that you install, you will definitely need to do this.
Backing up your SerialEM installation. To backup your SerialEM installation on Windows 7 and later, copy C:\ProgramData\SerialEM to a safe location, a backup of C:\Program Files\SerialEM is not required if the installation was performed as described here. On Windows XP, copy the files SerialEMcalibrations.txt, SerialEMproperties.txt, SEMflybackTimes.txt (on systems with STEM), SEMsystemSettings.txt, SEMshortTermCal.txt from C:\Program Files\SerialEM, also include all user settings.
Upgrading to a New Version. What the installer will NOT do is update the plugin to DigitalMicrograph on a remote computer, or the server on a remote FEI microscope, so you may need to do this manually. SerialEM will determine the versions of these components and inform you if they need to be updated. Thus, the most convenient approach is simply to start SerialEM after installing a new version and copy whatever file it tells you needs upgrading. When running DM remotely, this entails copying the appropriate plugin to the remote computer and renaming it as needed, as described below in the section on To connect to DigitalMicrograph through a socket interface. When running an FEI scope remotely, a new version of FEI-SEMserver.exe would be copied to the scope computer.
Existing properties, calibrations, and settings files are always compatible when upgrading; there is no need to recalibrate the program.
Permissions and Running as Administrator. Make sure that all files in the program folder (C:\Program Files\SerialEM) are readable by users. Make sure that users can write to the configuration and data file folder, which is the default location for the gain references to be placed. In Windows 7/Server 2008, be sure to do this before starting the program. Right click on C:\ProgramData\SerialEM, select Properties, then select the Security tab if it exists. Select the appropriate user group, press 'Edit', and turn on 'Full Control'. If there is no Security tab, select the Sharing tab, press Advanced Sharing, turn on 'Share this folder', press 'Permissions', then 'Add' the appropriate user group (or select 'Everyone') and turn on 'Full Control'.
In Windows 7/Server 2008 with GMS 2.x, it may be necessary to run SerialEM as Administrator. If there is an initial error connecting to the SerialEMCCD plugin, try right-clicking on the SerialEM shortcut and selecting "Run as Administrator". If this is successful, you can set up any shortcut to run the program this way; right-click the shortcut, select Properties, select the "Compatibility" tab, and check "Run as Administrator". An alternative to this requirement is to connect with a socket interface (see below) instead of the security-laden COM interface.
When connecting with a JEOL scope on Windows 7, running as Administrator was always needed until recently. When SerialEM has to be run as Administrator, if DigitalMicrograph is not also run as Administrator, SerialEM will probably fail to connect to it. The alternatives here are to run DM as Administrator or to connect with the socket interface.
Determining IP addresses on a shared network. When the SerialEM setup requires communication between two computers, it may not be straightforward to find out the IP address that is needed. A general procedure is to open a Command Prompt window on each computer and run 'ipconfig'. Look at the first three numbers in each IP address. There should be one pair of addresses where those three numbers match between the computers (often 192.168.0 or 192.168.1). You can then test the communication in each direction with the command 'ping' followed by the IP address of the other computer.
Defining an Environment Variable. In several situations, you may have to define a system environment variable to provide information for one of the components that SerialEM connects to. The procedure is:
Shortcuts, Command Line Arguments, and Administrator mode. When users log in to their own accounts, users should start SerialEM by means of a shortcut on their desktops. After creating the shortcut, always edit its properties to start in a folder belonging to the particular user. That way, each user will have their own settings file, separate from the one that inevitably ends up in the SerialEM folder because someone starts SerialEM by clicking on the program itself.
When users all share one account, they can have separate settings if there is a shortcut for each user, which can be placed either on the desktop or in a folder on the desktop. The frameworks files that we distribute provide a structure for holding settings files and shortcuts for each user in a folder 'UserSettings' under C:\Program Files\SerialEM (Windows XP) or C:\ProgramData\SerialEM (Windows 7). To make files and shortcuts for a new user:
Do not run the SerialEM.exe in the package subfolder, or make a shortcut to that copy of the program. If you do, the program will load all the plugins in that folder. Then it will complain about multiple microscope plugins and refuse to run.
If you set up separate properties and calibrations for running at a different voltage, those files can be accessed by running with a separate shortcut. As of SerialEM 3.3.1, this is done by having the shortcut include an argument specifying the subfolder where the files are located (see Setting Up for a Separate Voltage).
Three other entries besides a subfolder are allowed as command line arguments on the target line of a shortcut. They can be in any order, as long as they appear before a final subfolder for the location of system files, if any. They are:
Note that a user's settings file contains an entry for the system path. A user can change this to point to a different location where the program will seek the Properties and Calibration files. This provides two possibilities: that the configuration files can be installed in a folder other than the default one; and that a different set of properties and calibrations can be set up for some circumstances, such as running a beta version of SerialEM. It also provides for the arrangement described next.
As the program administrator, you should start SerialEM with the shortcut in the UserSettings/Setup subfolder (copy this shortcut to the desktop if you want.) When you start SerialEM with this shortcut, you will access the settings in this folder that might differ significantly from what people use for production use.
Whenever you start the program to do some calibrations, turn on 'Administrator mode' (in the Calibration menu). In this mode (which has nothing to do with running as Administrator in Windows 7), you will get extra output from some calibration procedures, and you will also be protected from exiting without saving calibrations. You can add a property 'StartAsAdministrator 1' to do this automatically during initial program setup, then remove it when you are done.
The procedures below refer to a number of entries to be made or modified in the properties file. Each entry has a mixed case keyword followed by one or more values. See Property File Entries for more details.
A Minimal Setup Procedure
Do you find the full setup procedures daunting? Do you want to do just enough to get the program usable and try taking a tilt series? If so, for an FEI microscope, you can do the setup in two stages, first going through all of the items indicated as Priority 1 below, then going back later and doing Priority 2 items. (It is strongly recommended that you not stop with Priority 1 items) When you read the explanation of some of the Priority 2 items, you may find that they are not relevant to your needs and can be skipped. In addition, there are some procedures documented below 'for the sake of completeness' which you can almost certainly skip.
The initial minimal procedure would be:
After doing these items, you can work with the program and try doing a tilt series, but you will not be able to control the intensity during a tilt series unless you calibrate beam intensity for at least one spot size (see Beam Intensity ). Other specialized features will not work until the rest of the calibrations have been done.
Starting with a Generic Properties File (Priority 1)
If your properties file has not been configured for your scope yet, you can start with a generic file, but only on an FEI scope. The generic file does not contain many essential entries for JEOL or Hitachi microscopes. If you download and unpack the GenericFramework.exe file, you should also download GenericProperties.txt from the Tools folder on the SerialEM download site (http://bio3d.colorado.edu/ftp/SerialEM/Tools), rename it to SerialEMproperties.txt, and replace the file from the framework. Then download and incorporate camera properties and magnification table files from the Tools folder.
If the program is running under Windows XP or Windows 2000, you need to make the following modifications.
If you have a Gatan camera with GMS 2.x or GMS 3.x, you need these modifications to the Properties file:
Connecting with an FEI Microscope through Plugin and Server (Priority 1)
FEI scope plugin interacts with an FEI microscope using a COM connection to the
FEI scripting adapter, but this is not possible when running SerialEM on a
separate 64-bit computer, such as a Gatan K2 or Direct Electron camera computer, or
64-bit FEI systems. A
connection is possible in these cases by using a network socket connection to a small server
Yes, You Need a Network Connection between the Computers. SerialEM does not use DigitalMicrograph's serial-port based communication with the scope; it requires a network connection between the computers. These points may be helpful if you do not have a connection.
Setting Up the Plugin and Server. These steps need to occur:
When the server is started, a DOS window will appear with messages about connections as they occur. When SerialEM starts, there will be a message in its log about whether the plugin loaded successfully. If the connection fails, some debugging output is available in SerialEM by adding the property 'DebugOutput K'. Debugging output is available in the server window by defining the environment variable FEISEMSERVER_DEBUG to 1 (for some output) or 2 (for very verbose output). If 4 is added to the value, the server will attempt to put output in a log file at C:\Program Files\SerialEM\FEIServerDebug.txt if that folder exists.
Moving an Existing Installation from an FEI Computer to a 64-bit Computer. If already have SerialEM running on an FEI computer and want to run it on a 64-bit computer instead, some steps are needed in addition to the ones listed above:
Upgrading to the New Plugin and Server from SerialEM 3.4.
As SerialEM will inform you when you upgrade to 3.5, you need to update the
Running 64-bit SerialEM on a 64-bit FEI Computer. This is more straightforward. With a new system, first try to run the 64-bit version of SerialEM without the server. If you get a message about the 'dark field element', use the server with these steps:
Initial Camera Setup (Priority 1 and 2)
You should set the basic properties of your camera(s) in the properties file before starting SerialEM. If you received a file configured for your scope, most of this should be set up already, but you should go through these lists of items to find the ones you do need to change and to become more familiar with the intricacies of camera setup. If you are going to set GainNormalizeInSerialEM to 0, you do not need to specify UsableArea, BadColumns,or DMGainReferenceName. However, gain normalizing in SerialEM has several advantages for CCD cameras, including faster image acquisition, the ability to retain many dark references, and the ability to remove X rays from dark references. (DigitalMicrograph maintains only one dark reference per binning, which may force a lot of unneeded dark reference acquisitions when switching between parameter sets, unless dark references are coming from a file.) Newer Gatan cameras (K2 and OneView) will always normalize in DigitalMicrograph.
Camera Configuration for Image Orientation. Before you start any calibrations, make sure that your camera is configured so that images acquired on the camera have the same orientation as images on the viewing screen. If you have a Gatan 4-port readout camera with First Light controller, the camera configuration should generally be set in DigitalMicrograph to flip images around the Y axis. If for some reason the image orientation cannot be made to match that on the viewing screen (e.g., the orientation cannot be changed, or other software or other users require the odd orientation), then you may need to set properties to compensate. If there is a rotation, you would need an ExtraRotation entry for that camera. If the image is flipped, you would need an entry for InvertStageXAxis, which is a global setting, and possible an ExtraRotation entry too. In any event, after you have settled on a camera configuration for a Gatan camera, add a 'DMRotationAndFlip' property for each camera to get a warning if the configuration is changed from this setting. Having this entry can save a lot of time figuring out what is wrong when the configuration gets changed. The number to enter with the property is the rotation in DM divided by 90, plus 4 if there is flipping around the Y axis (e.g., typically 4 for an UltraScan). Here are all the possibilities:
|Setting in DM Configure Camera||DMRotationAndFlip||RotationAndFlip for K2|
|No rotation, no flip||
|90 degree rotation, no flip||
|180 degree rotation, no flip||
|270 degree rotation, no flip||
|No rotation, Flip around Y||
|90 degree rotation, Flip around Y||
|180 degree rotation, Flip around Y||
|270 degree rotation, Flip around Y||
General camera related parameters (and a few other things that could be dealt with later, but you might as well attend to them now or be aware of them.) (First 3 are Priority 1):
Parameters for each camera (many relevant only to Gatan cameras, all Priority 1):
For a Tietz camera, attend to the following settings:
To connect to DigitalMicrograph through a socket interface on the same or a different computer, such as for a K2 camera on an FEI microscope, you need to do the following:
For a K2 camera in particular, there is more to do:
For a Direct Electron direct detection camera, particularly if you are upgrading to SerialEM 3.4 or higher from an earlier version, note these points:
For a Falcon 2 camera that can save intermediate frames, under original scripting interface:
For a Falcon 2 camera under the new advanced scripting interface:
For a Falcon 3 camera:
To use a GPU for aligning frames in SerialEM with any of these Falcon configurations:
For accessing a JEOL camera or STEM signals,
copy the file JeolCamPlugin.dll from the package directory to the main SerialEM
directory. (The file could be placed in a 'Plugins' folder inside
C:\Program Files\SerialEM instead, but this is no longer necessary and could
fail on some computers. If there is already a copy of this file there,
remove it.) If SerialEM is running on the JEOL PC, this is all that is
needed, in addition to an appropriate set of camera properties.
If SerialEM is running on a separate PC, it can still access these cameras by connecting to a server running on the JEOL PC. Copy either JEOL-SEMCamServer32.exe or JEOL-SEMCamServer64.exe to the JEOL PC, depending on whether it is running 32-bit or 64-bit JEOL software. Put it in some logical place (C:\Program Files\SerialEM could be created just for this purpose) and make a shortcut to it on the desktop so that it can be run easily. By default, this connection uses port 48896, although a different port can be used by defining the environment variable JEOL_SEM_SERVER_PORT with the port number on the JEOL PC. You also need to add the properties (with the appropriate port number)
SockerServerIP 4 ip_address_of_JEOL_PC
SocketServerPort 4 48896
For accessing a Tietz camera remotely,
copy the file Tietz-SEMServer.exe to the Tietz camera computer. Put it in
some logical place and make a shortcut to it on the desktop so that it can be
run easily. By default, this connection uses port 48897, although a different
port can be used by defining the environment variable TIETZ_SEM_SERVER_PORT with
the port number on the Tietz PC. You also need to add the properties (with the
appropriate port number)
SockerServerIP 5 ip_address_of_Tietz_PC
SocketServerPort 5 48897
After you have checked out these settings, you are finally ready to run SerialEM and try taking some pictures. Experiment with the different camera parameter sets, varying the binning, the area being acquired, and the shuttering selection if appropriate. You may have to take a gain reference in SerialEM before you can get a gain normalized image. If you run into problems, try taking unprocessed and/or dark subtracted images as well as varying the binning and image area to see under which conditions the problem occurs.
Bad dialog sizes.
When you start SerialEM, you may discover that the control panels on the left are not all the same width, and that some text appears truncated in the control panels or dialogs. This happens when there is a mismatch between the actual DPI setting of the display and what the program thinks it is. As of SerialEM 3.4.0, the program is supposed to detect the DPI, which should make the property 'DisplayIsNot120DPI' unnecessary. As of SerialEM 3.6.0 (Nov. 27, 2016), the program should behave properly with DPIs of 96, 120, or 144 without such a property setting. If there is a sizing problem, check the properties file for the entry 'DisplayIsNot120DPI' and try removing it if it is there, or adding it with a value of 0 or 1; the property 'AssumeDPI' may also be helpful. See the description of these two properties in Property File - General Properties. Set the property 'DebugOutput' to 1 to get a report on the detected DPI during program startup. If you have a high-DPI monitor, try to set the text size in Windows to achieve a DPI of 144, or set a custom DPI size to 144.
Initial Actions and Other Special Features for Hitachi HT7700 (Priority 1)
The Hitachi HT7700 has some design features that require special calibrations and particular care when first setting up SerialEM for it. A number of deflector setttings are remembered when you leave a particular state and reimposed when you return to it. This is a good thing if it maintains an alignment of some kind, such as to keep images aligned when changing magnification. However, it becomes a problem if the same deflector is used by SerialEM to control a feature like image shift. In such a case, it is necessary to record the values that the scope wants to reimpose, so that it is possible to make an appropriate change after the scope has reset the parameter.
Another consequence of the microscope's behavior is that operations using image shift in LM and HR modes will leave the mags misaligned after SerialEM exits, because SerialEM does not clear out the image shift before leaving a mag. If this is a problem, users can be told to run the Restore Neutral IS routine before leaving SerialEM; this will put the deflectors back to their stored values.
Calibrating beam shift between spots. When changing to a spot size, the microscope reimposes the last beam shift seen at that spot size. This interferes with SerialEM's shifting of the beam for various reasons. Thus it is necessary to calibrate the actual beam shifts needed to align the spots, which allows SerialEM to maintain a desired beam shift when changing spots. This should be done with Spot Beam Shifts in the 'Calibration-Beam & Spot' menu before aligning spot intensities.
Image shift, pixel sizes, relative rotations, and shift boundaries. The effect of the image shift deflectors is nearly constant over some mag ranges in HC mode, but varies progressively at lower mags and has at least one jump in higher mags. Similarly, the effect of the IA deflectors in LM is nearly constant until the lowest mags. This makes the behavior unlike an FEI scope, where image shift is invariant at the specimen, and much like a JEOL for those mag ranges. In consequence, the full calibration of image shift, pixel size, and relative rotations at all relevant mags is advised for the most reliable performance, although in principle the image shift calibration could be relied on for pixel size and rotation information in the portions of mag ranges where image shift is nearly invariant. Once calibrations are done for HC and LM modes and inserted into properties, the List IS Vectors command should be run to identify image shift boundaries, which should be specified in the OtherShiftBoundaries property.
HR mode. Image shift in HR mode can be done with either the IA or PA deflectors, boh of which provide projector-like image shift, but neither provides the invariant image shift on the camera seen with projector shift on a JEOL. The program automatically identifies every mag in HR as an image shift boundary. It should be possible to do the usual spatial calibrations in HR mode, but there may be some other problems. It is not known whether beam crossover is consistently different in HR mode and would need to be stored separately. It is also possible that, even with a difference in crossover taken into account, beam intensity calibrations would need to be stored separately for HR mode.
Stage calibrations with waffle grating. The stage on the HT7700 appears to have rather long-range backlash effects, so the default backlash correction for stage montages and calibrations is set rather high. However, cyclical variation in stage movement appears not to occur, and thus it is safe to do stage calibrations over an extent of only 40 microns. This means that the waffle grating can be used, provided that one starts in the very middle of a grid square. Such an extent is now the default for non-FEI scopes.
Checking the Magnification Table and Calibrating Neutral IS Values (Priority 2 on FEI scope, Priority 1 on JEOL)
You should start with a properties file that has a magnification table but does not have any 'RotationAndPixel' lines in it. The procedure is to start SerialEM and run the 'List Mags' command from the 'Calibration' menu. Compare this listing with the magnification table in the properties file. If it matches, you are ready to go on. If not, you need to cut and paste the output of 'List Mags' into the properties file. On an FEI scope, step through the mags with the screen down and type in the mag that the microscope user interface shows. On a JEOL, the third field can be left blank or filled with 0's.
On an FEI scope, now that you know the relation between mag index and mag, find out which is the lowest mag in M mode and verify that LowestMModeMagIndex is correct. On the JEOL, the routine will provide this value.
On the JEOL, following this magnification table will be a table of camera lengths for using diffraction mode. This table should be inserted in the properties file if it is not already there. The first line added to the properties file should be 'CameraLengthTable nn', where 'nn' is the number of lines of camera lengths that follow.
If you have a GIF, repeat these steps with EFTEM mode on.
For a JEOL, it is very important to calibrate the neutral values of image or projector shift (whichever is being used in your setup), so that the program can maintain the actual image shift correctly between magnifications. Simply run Neutral IS Values in the Calibration menu. This calibration needs to be redone whenever there is a service alignment of the magnifications.
Measuring Relative Gain Factors for FEI Eagle, Tietz CMOS, and other Cameras (Priority 1)
The gain of an Eagle camera varies with binning, and it is necessary to calibrate the change in gain in order for dose calculations and intensity-related operations to work properly, including the acquisition of a gain reference. This calibration appears to be needed with some OSIS cameras also. To do this, set the 'Trial' parameters for a full-field dark-subtracted image at the maximum binning. Set the exposure time to 0.2 second and adjust the beam intensity so that 'Trial' gives an image with counts between 1/2 and 3/4 of the saturation level. Take an image and use 'Ctrl-I' to get the mean counts in the image. Repeat at each binning down to 1, without changing the exposure time.
For each binning 'n', compute the gain factor as
(counts at binning n) / ((counts at binning 1) * n * n).
Add a single line to the CameraProperties section of the properties file,
RelativeGainFactors 1.0 f2 f4 f8
Where f2, f4, and f8 would be the factors measured for binnings 2, 4, and 8. For the Eagle, these factors should be about 0.35, 0.16, and 0.13.
Relative gain factors are also needed for the Tietz CMOS cameras: F816, F416, and F216 with their default setup, but here the factors are known and there should be no need to measure them. Simply take an image with binning 4, then with binning 2 and 1 with the same exposure time. With the default setup, the images should have the same counts, and the camera properties would need the line
RelativeGainFactors 1 0.25 0.0625
It is possible to set the configuration for DE cameras to bin by averaging instead of summation, in which case the gain factors are needed there as well. If there are binnings of 1, 2, and 4, the line just above will work; if there is a binning 8, the line needs 0.015625 at the end.
The Falcon 3 and Ceta 2 cameras also have relative gain factors to keep the number of counts constant with binning; the line above will work for Falcon 3, and for Ceta2 it needs 0.015625 at the end. With the new FEI camera scripting interface, the same behavior can be imposed for Falcon 2 and Ceta 1 camera by adding the camera property 'AutoGainFactors 1'.
Gain factors may also be needed for a Gatan OneView camera, so the relative gains should be measured as described above. If a factor is not 1, it will be exactly the inverse of a power of 2. On one camera these factors were '1 0.25 0.125 0.0625'; on another, no factors were needed.
Tuning Timing of Gatan Camera with Two Shutters (Priority 1)
Camera timing settings are important for proper function of SerialEM's 'Dual shuttering - minimum exposure' option, which is needed to minimize specimen exposure using the standard shutter and to provide a flexible range of drift settling times. Measuring them involves two steps: using a DigitalMicrograph script to estimate the BuiltInSettling, or clear time of the CCD chip; and using a procedure within SerialEM to determine the average delay for an exposure to start after SerialEM issues a request for one, and the variability in this delay. An alternative procedure involving an oscilloscope is described below but is not needed because the measurement of the startup delay time makes up for any inaccuracies in the clearing time.
If the camera controls only one shutter, skip the DigitalMicrograph script and just follow the procedure described in the next section. It is not so important but it will to provide a check on the timing for performing tasks after an exposure.
To estimate BuiltInSettling for a CCD camera, open the 'cleartime.s' script available from the Tools folder on the SerialEM download site. You can do this with the File - Open menu entry in DM, or just by clicking on the file. Run the script by pressing Ctrl-Enter. It will time a series of exposures and report the mean time. It will then recommend values for BuiltInSettling based on subtracting 0.155 second for large format one-port readout cameras (Megascan 795 and Ultrascan 890, 2Kx2K 30-micron pixel or 4Kx4K 15-micron pixel) or 0.065 second for the four-port readout Ultrascan 895. These correction factors are based on the 4 cameras that I have been able to run the script with. The script is of no use with CMOS cameras like the K2 and OneView.
If you have more than one camera, change the 'cameraNumber' value at the top of the script and rerun it.
Once you have entered a correct value for BuiltInSettling in the properties file, restart SerialEM. Change the 'Trial' camera parameters so that the exposure time is 0.4 seconds and set the binning to get a 1024x1024 pixel image. Take a 'Trial' picture without a specimen and adjust the beam to give an image with moderately high counts (between 1/3 and 3/4 of camera saturation). Then select Camera Timing in the Calibration menu and accept the default entries. This routine will take 100 exposures with timing parameters that will allow it to estimate the delay time for the exposure to start from the image intensity. It will recommend values for StartupDelay, MinimumDriftSettling, and ExtraBeamTime, and it may also recommend a change in BuiltInSettling to keep StartupDelay from being negative. Insert these in the properties file entries for the particular camera. There will probably also be a recommended value for MinimumBlankingTime which you should insert along with other general camera-related properties near the top of the properties file. If you have more than one camera, repeat the procedure with the other camera.
You should rerun the camera timing procedure and adjust your properties entries if there is a computer upgrade, a major software upgrade, or the addition of a GIF. The timing may also depend on whether images are gain-normalized in DM or in SerialEM, so rerun the procedure if you change the GainNormalizeInSerialEM property.
Measuring Camera Timing for Non-Gatan Camera or Gatan Camera with One Shutter (Priority 2)
Calibration of the timing of a Tietz camera, or a Gatan camera with only one shutter, is needed only to allow the program to takes actions (e.g., tilt and image shift) during image readout. It is not needed for Eagle cameras where these actions are not allowed because the timing is inherently more unpredictable. Change the 'Trial' camera parameters so that the exposure time is 0.4 seconds and set the binning to get a 1024x1024 pixel image. Take a 'Trial' picture without a specimen and adjust the beam to give an image with moderately high counts (between 1/3 and 3/4 of camera saturation), except on a K2. The timing routine will use super-resolution mode for a K2, and does not need very high counts. Then select Camera Timing in the Calibration menu and accept the default entries. This routine will take 100 exposures with timing parameters that will allow it to estimate the delay time for the exposure to start from the image intensity. It will recommend values for StartupDelay and ExtraBeamTime. Insert these in the properties file. If the procedure measures a delay successfully, then you can set DefaultActAfterExposures to 1.
Setting Tietz and Eagle Camera Binning Offsets (Priority 1 for Eagle and some Tietz)
Some Tietz F224 cameras have had a problem with gain-normalization of binned images, although F415 cameras have not shown this problem. The same problem has appeared on 4K and 2K Eagle cameras. Although the problem can be solved by making separate gain references for the different binnings, a more convenient solution (for the user) is to use 'BinningOffset' entries in the camera properties section. Here is a procedure that uses cross-correlation and does not require a trained eye to see the offsets:
Binning offsets are also needed for Gatan 4-port readout cameras but these offsets are predictable and the program will set them up automatically.
Assessing Standard Focus for Low Mag Mode (Priority 2)
This assessment should be done before the low magnification image shift and pixel size calibrations needed to use the Navigator. The ill-defined nature of focus in Low Mag mode means that it would be easy for a user to set a focus that creates two problems: 1) image scale might be significantly different from the scale at the focus at which calibrations were done; 2) the image position might depend on beam position to an extent that makes localization of positions problematic when using the Navigator. The solution is to use a standard focus for the calibrations and for mapping in Low Mag mode. This standard focus should be one that minimizes beam-position dependent image movements. The procedure is this:
Focus Calibration (Priority 1)
Focus only needs to be calibrated at one magnification as long as there are image shift calibrations available to transfer the focus calibration accurately to other mags. Typically, this calibration should be at a mag in the range where data will be acquired. However, when using the procedures below for calibrating image shift and pixel size, it may also be helpful to have a focus calibration at the mag where these calibrations will be started. Set up the Focus parameter set to give moderately good, quick pictures with a binning of at least 2. Wide quarter and center half are two possibilities; if you have a smaller format camera, use a center half area.
Before calibrating focus, you should adjust the beam tilt so that the beam-tilt induced image shift is roughly 30 nm when defocused by 10 microns. Here is a procedure for this adjustment:
Change to your chosen magnification and start the focus calibration procedure (see Autofocus for more details.) Accept the defaults to calibrate a nice big range of defocus. The image shift calibrations will be started at a mag where the field of view is about 3 microns. If this mag is far from the one where you calibrated focus (say, a factor of 2 or more), calibrate focus there as well.
Calibrating Image Shift and Pixel Size (Priority 1 and 2)
The procedure described next involves calibrating the image shift at a series of magnifications and saving that information in the calibrations file, as well as taking a series of images and measuring the magnification and change in image rotation directly from them and entering this information into the properties file. How much of this you need to do depends largely on the type of microscope and on whether you intend to use the Navigator, as detailed in the table below. The goal here is to calibrate not just the image shift at each magnification but also the relationship between specimen and camera coordinates, specifically the pixel size on the specimen and orientation of the specimen axes on the camera. The basic principles underlying the calibration requirements are:
The minimal requirement is to measure one pixel size in each magnification range where the relationship between image shift and movement on the specimen is constant, and to measure an absolute rotation angle somewhere plus the rotation of images between those magnification ranges. On FEI scopes, there are just two such ranges, LM mode and regular mag mode. On JEOL and Hitachi scopes, there are often multiple ranges together with progressive changes in image shift strength within a range. In practice, it is recommended that redundant measurements be made, and the procedures have been refined to ease this task.
Setup for Work at Regular Mags Only
|FEI scope||JEOL and Hitachi|
|Image shift from lowest M-mode to highest mag needed||Image shift from lowest non LM-mode to highest mag needed|
|Minimal requirement: one pixel size, one absolute rotation angle in regular mag range||Minimal requirement: one pixel size in each image shift range, relative rotation across each boundary, one absolute rotation angle|
|Recommended: Pixel size for all mags where data is likely to be taken (rotations optional)||Recommended: Pixel size and relative rotations between all mags from lowest non LM-mode to highest mag needed|
Setup for Navigator Use in LM Mode
|FEI scope||JEOL and Hitachi|
|Check that eucentric focus in LM mode gives minimal image shift with beam movement, set a StandardLowMagFocus property if not||Check that standard focus in LM mode gives minimal image shift with beam movement, set StandardLowMagFocus property|
|Image shift for all LM mags down to lowest needed||Image shift for all LM mags down to lowest needed|
|Pixel size at highest LM mag||Pixel size for all LM mags down to lowest needed|
|Relative rotation from highest LM to lowest M mag||Relative rotations between all mags, from lowest LM needed to lowest non LM mag|
|Stage calibration: lowest M-mode mag, 2 or 3 mags in LM||Stage calibration: lowest good non LM-mode mag, 2 or 3 mags in LM|
|Image shift offsets from ~10-20K down to lowest LM mag needed||Image shift offsets from ~10-20K down to lowest LM mag needed|
FEI: For work at regular magnifications, calibrate image shift from the lowest M-mode mag up to the highest mag where tilt series might be taken. It is recommended that you calibrate pixel size over the range of magnifications where users would typically expect an accurate pixel size, using the procedures described below, which will also yield relative rotations. You should definitely enter a calibrated rotation angle for one mag at which tilt series are typically run.
To enable Navigator use, measure the pixel size with the calibration grating at the highest LM-mode mag. Switch to a non-periodic specimen suitable for lower mag work and calibrate image shift at all LM mags down to the lowest mag that might be needed for grid mapping. Do the other steps listed in the table, described in other sections. Use the stage calibration to obtain an absolute rotation angle in LM.
JEOL: Image shift shows discontinuities at a number of lower mags in the regular mag range and is not as constant as one might wish even within the ranges. Thus, it is necessary to calibrate image shift as well as measure pixel size and rotation between mags up to the highest mag at which tilt series might be run. A calibrated rotation angle is also needed for one mag at which tilt series are typically run.
To enable Navigator use, image shift calibrations as well as pixel sizes and relative rotations are needed throughout LM mode, down to the lowest mag needed for mapping. Before following the procedure below for regular mags, start at the lowest LM mode mag needed, go to standard focus, and take and save pictures of the calibration grating at each mag. You may be successful at calibrating image shift with this grating, but it is more reliable to use a specimen suitable for low mag work instead.
On a JEOL or Hitachi, the beam is not moved along with the image, so SerialEM needs to apply beam shift whenever it does an image shift. This will not happen until you do a beam shift calibration, which needs to be done after at least one image shift calibration. Thus, you need to spread the beam to at least twice the size of the CCD camera to get through the image shift calibrations successfully.
Other preliminaries: The image and stage shift calibrations are the ones that give the most trouble for inexperienced users (and sometimes for experienced ones too). There are several things you can do to minimize problems:
A script for image shift and pixel size calibrations: Open a script editor for an unused script. For example, select 'Edit 10' in the Script menu and then click the right arrow if necessary until there is no text in the window. Select, copy, and paste the following:
SetupWaffleMontage 5 wafflemont-$repVal1.mrc
If $repVal1 == 1
Copy B A
The script will change magnification only if pixel size has not been found yet (so it can be stopped and run again after changing conditions, for example). With the 1 after 'IncMagIfFoundPixel', it will increase mag; with a -1, it will decrease it. Then the script will take a Trial picture so that you can see right away if conditions are suitable. It will autofocus, then calibrate the image shift. It then obtains an image for measuring the pixel size that has at least 5 grating blocks in each direction. This will be a single image if possible; otherwise the program will open a file for a montage of the correct size and take a montage. Finally, it will find the pixel size.
The script will open a montage file in the current directory, whatever that happens to be. To have the files opened in a defined location, add a complete path in front of the filename 'wafflemont...'.
The procedure: This section describes the operations on the microscope for calibrating pixel sizes and image shifts. The commands are all in the Calibration - Pixel Size submenu.
To get set up for the procedure, do the following:
Now that this pixel size is in place, the script can be used, because the program will be able to estimate correctly whether a montage is needed.
Run the script repeatedly, going to progressively higher mags. Aside from watching for problems and adjusting the beam as needed, watch out for any large (90 to 180 degree) rotations from one mag to the next.
The program is accumulating information about the relative rotation between successive mags, using the angles of the grid axes when finding pixel size. However, these angles, and thus the relative rotations, are only known to the nearest 90 degrees, and it is up to you to make sure that they correspond to the actual rotation between mags. You can do this all at once at the end, as long as you keep track of which mags could be wrong, or you can fix each large rotation as it occurs. The procedure for fixing rotations is to run List Relative Rotations to see what the program thinks the relative rotation is (the second number on each line, after the mag index). Fix a value with the Add 90*n to a Rotation command and rerun List Relative Rotations to make sure it now shows an appropriate relative rotation.
If you reach a mag where the montages seem impractical, but you want image shift calibrations and pixel sizes above that point, then you can start changing mag manually, autofocusing, and running Image Shift Calibration from the menu. On an FEI scope, fairly accurate pixel sizes will be derived from the image shift calibrations. On a JEOL or Hitachi, where image shift may not be invariant, you would have to take and save single frame images at each mag, starting with the last one where pixel size was measured, and follow the procedure below in Measuring further relative rotations and pixel sizes by aligning images. Alternatively, you can use catalase crystals; see the Catalase Crystal command.
When you have reached the highest feasible or needed mag, return to the starting mag, change the 'IncMagIfFoundPixel 1' to -1 in the script, and close any open montage files. Start running the script to go to lower mags.
On an FEI scope, you can stop running this procedure at the highest LM mode mag (or even the lowest non-LM mode mag, if you have no need for calibrations in LM mode.) To continue calibrating image shift throughout LM mode, it is best to switch to a non-periodic specimen, and preferably one with larger grid spacing suitable for calibrating stage shift. However, you can try to finish the image shift calibrations with the replica grating if that is more convenient.
There is one potential problem to watch out for on Titan microscopes, mostly at the top of LM mode. A very long settling time after lens normalization has been required on some microscopes. The need for this will be revealed by a poor result on the first image shift calibration at the top of LM mode. If this happens, first try running Remove IS Cal to make the program forget the bad calibration, then run the script again. The 'ShiftCalSkipLensNorm' command in the script will keep the calibration routine from normalizing lenses again and causing the problem. To continue calibrating image shift below this point, there are two options:
On a JEOL or Hitachi, try to run the procedure in the script down to the lowest mag that might be used for mapping. There are several things to watch out for and changes that may be needed:
Measuring further relative rotations and pixel sizes by aligning images: This procedure is needed only under the two circumstance described above. Open a copy of the mag calibration spreadsheet. Set the binning and the size of the pixels on the CCD to the correct values. If necessary, adjust the magnifications listed in the first column. Take any unbinned pixel sizes printed in the log after running the Find Pixel Size routine and copy them into the 'Unbinned cal pixel' column (overwriting the formula that computes the pixel size from modeling measurements).
Further processing is done in IMOD as follows. First use Midas to get a rough prealignment of the images:
midas -b 0 filename.st filename.inixf
For each image pair, change the magnification (Shift-right mouse button) so that they are close to matching, and shift and rotate as necessary to get into rough alignment. As long as they are aligned in the center, xfalign should be able to complete the job. If you can't match up a pair of images because the microscope is not well enough aligned, just skip the pair. Also, if you have good relative rotations from the pixel size routine, you could skip most of the images with pixel sizes: namely, from the second lowest mag up to the highest mag with a pixel size, you would not need to align the image with the one at eth lower mag.
Save the transforms and run:
xfalign -red 1 -bi -ini filename.inixf filename.st filename.xf
(If for some reason you have 512x512 images instead of 1Kx1K, use '-red 0' instead of '-red 1'.) When it is done, restart Midas with:
midas -b 0 filename.st filename.xf
Look at each pair to make sure it is well aligned. Save the transforms. If you only have two images, you can skip the spreadsheet entries and proceed to putting two lines in the properties for this camera, e.g.:
RotationAndPixel 16 999 999 10.5
RotationAndPixel 17 158.17 999 9.90
Where 10.5 and 9.90 are the pixel sizes measured for the two mags, 158.17 is the NEGATIVE of the rotation angle shown in Midas, and the 999's indicate unmeasured values. Skip to the section below to see how to enter the absolute tilt axis rotation.
If you took a full set of images, copy the Midas rotation, magnification, and stretch values into the appropriate lines of the spreadsheet (the first image pair provides data for the second mag). The rotation is just there to keep a record of it, but the Midas mag and stretch are resolved into a single number, in the 'Midas delta mag' column. You may find it easier to run:
This will list the rotation, magnification, and stretch values for each transformation in the file, as well as net magnification value on the right that you can put directly into the 'Midas delta mag' column. Unfortunately, xf2rotmagstr was broken and gave rotations with the wrong sign from IMOD 3.12.23 through IMOD 4.2.25. so be sure to use an IMOD version where it was not broken or invert the sign. For the lower mags, you can compare the 'delta mag' values with the 'Delta pixel' values to see how accurate these two methods are. The real use of the delta mag's is to derive pixel sizes above the last mag where you could measure it directly.
Suppose the last mag where you measured the pixel (or the last one where you trust the measurement) is on line 11.
Enter the appropriate numbers from the spreadsheet in a series of 'RotationAndPixel' lines in the properties file. Each line should have:
RotationAndPixel <Magnification index> <the NEGATIVE of the Midas rotation> 999 <Pixel size>
Absolute rotation angle: The last number missing from the RotationAndPixel entries is an absolute calibration of the rotation of the tilt axis. The angles from stage calibration should be used at lower magnifications, where the stage calibration routine is robust. For medium to high magnifications, the angle is most reliably obtained from a fiducial alignment of a tilt series. However, the angle from fiducial alignment can be off by 180 whereas the angle from an accurate stage calibration will always be in the correct quadrant, so you should always consult the results from stage calibration when setting this angle from a tilt series alignment. In IMOD, the angle by which the tilt axis is rotated from the vertical is shown in the 'Rot' column of the alignment solution log. If the value varies through the series, use the value from near zero tilt, which is summarized at the top of the solution. Once this value is available, replace the 999 on the RotationAndPixel line for the relevant mag with this value plus or minus 90 degrees (depending on which direction makes the angle match that from stage calibration). If you only measured one or two pixel sizes, this angle will most likely be measured at a different mag, in which case you would add a line such as:
RotationAndPixel 23 999 77.5 999
Where 77.5 is the measured absolute rotation.
In general, it is good to add to the RotationAndPixel lines the angles from stage calibrations done at the lowest non-LM mode mag and the highest LM mode mag. This is especially important if you do not enter an angle from a tilt series.
You can also use the rotation angle from a stage calibration or tilt series alignment to adjust the entry for 'GlobalExtraRotation'. Both this entry and the 'ExtraRotation' for a particular camera are used as fallback values when there is no other source of an absolute rotation angle, but they both become irrelevant for a given camera once that camera has an absolute rotation value. However, it could be useful to refine the value of 'GlobalExtraRotation' for use with other cameras. The basic principle is that the sum of the rotation angle in the magnification table for this mag (which could be wrong for a JEOL or Hitachi scope), plus the GlobalExtraRotation, plus the camera's ExtraRotation value, should equal the absolute angle on the RotationAndPixel line.
Other Microscope Calibrations (Priority 2)
Assessing Cycle Length of Compustage Movement Errors: In the SerialEM Tools is a file named cycleMacro.txt containing a script for assessing the error in stage movement over distances large enough to reveal the periodicity of these errors (this is described in more detail in Stage Shift Calibration). You will need the specimen suitable for stage calibrations described there and in the next paragraph. Open a script editing window with an Edit command in the Script menu, and press the Load button to load this script into the window. It will move the stage 132 microns in X and Y. Position the specimen in the middle of an area large enough in extent for this movement, and run the script. The output in the log window will show the difference between the measured and requested movement as a percentage; the cumulative sum of these differences in microns, and the total sum of measured shifts in microns. If the error is more than a few percent, the periodicity should be apparent in either the percentage or the cumulative difference. If there is a repeatable pattern, determine the distance between the extreme points in the pattern over one or preferably two cycles, and divide by the number of cycles to get the cycle length. If these differ from the default values of 62 microns for X or 41 microns for Y, add lines for 'StageCycleLengthX' and 'StageCycleLengthY' to the property file. Do not bother if the percent error is only a few percent.
This step may be optional since the values reported by Pulokas et al. and also found on the Boulder Tecnais may be universal constants for the Compustage. However, the problem appears to be minimal on recent stages. The JEOL and Hitachi stages do not have cyclical errors but require much greater backlash correction.
Low Magnification and Stage Calibrations: These calibrations are needed to do montaging with stage movement and to use the Navigator to acquire low and medium-mag maps. To calibrate stage shift, or image shift in Low Mag mode, you should have a specimen that is moderately rich in detail and that is either on a slot grid or on a grid with a very large mesh. It is tempting to use the same cross-line grating used for the pixel size calibrations. It can give reliable results, but only if these conditions are satisfied: 1) you do not have an older compustage with large cyclical errors that require traversing more than 40 microns; 2) the grid has a good supply of latex spheres; 3) the calibrations are not being done on a GIF with substantial distortions; and 4) you are familiar enough with the procedure so that you can tell when it is giving bad results. It is particularly challenging and quite likely a waste of time to do the procedure with a calibration grid lacking latex spheres. The option to use Whole-Image Correlations, which is important for finding the correct rotation angle, is also prone to create problems with the cross-line grating. The recommended procedure for using a grating would be:
Start at the lowest usable magnification in regular mag mode and find an area with good features. Run the Stage Shift command from the Calibration menu (read that entry for details). Drop to the highest mag in Low Mag mode. Repeat the stage calibration here, and also run an image shift calibration. The program will automatically do the latter from scratch if it is the first calibration in LM-mode. The calibrations in LM-mode will be done at the eucentric focus, or at the standard focus setting if it has been calibrated. Continue going down in mag, doing the image shift calibration at each mag. Do 2 more stage calibrations, one at an intermediate mag and one near the lowest mag that might be used for mapping.
In LM-mode, at least on the Tecnai with slot grids and coarse mesh grids, strange image effects sometimes occur at the higher magnifications. These can be eliminated by inserting the smallest objective aperture that does not occlude the image on the camera.
Illuminated area limits and aperture sizes on Titan: Before you do any of the
following three beam-related calibrations on a Titan, you should determine the
approximate limits of the illuminated area readout and add an
'IlluminatedAreaLimits' property with the lower and upper value.
Illuminated area values between these limits will then be mapped internally to
an intensity range 0.1 to 0.9, which will keep the program from seeing
out-of-range intensity values. The limits should be in microns divided by
100. One way to assess these limits is to start the program with
'UseIlluminatedAreaForC2' commented out and set up a script:
Run this script at several spot sizes and take the lower and upper limits from the range of the two outputs. The limits do not need to be precise, but they do need to be correct for the largest C2 aperture size. Thus, either switch to the largest C2 aperture before finding these limits, or multiply them by the ratio of the largest aperture to the current aperture (e.g., by 1.5 if the largest aperture is 150 and the current one is 100). Enter the property, uncomment 'UseIlluminatedAreaForC2', and restart the program. If this property is added or changed, it invalidates crossover, beam and spot intensity calibrations.
The following three calibrations will ask you to enter the C2 aperture size. You should first add a property 'C2ApertureSizes' with the available sizes in microns (.e.g., 'C2ApertureSizes 50 70 100 150').
Beam crossover calibration: This calibration should be done before the beam or spot intensity calibrations. Go to a high magnification like 100K, select Beam Crossover in the Calibration menu, and adjust the beam to crossover at each spot size.
Beam intensity calibration: This calibration is best done with no specimen. The procedure must be done for each spot size that will be used for tilt series; if low dose is going to be used, this might mean spots up to 6 or 8. In the latter case, try to calibrate up to whatever spot size gives 0.3 nanoamp of current. Start the procedure one or two steps above the highest mag that might be used (~200K for low spot size numbers, lower mags for the spots that will only be used for low dose?). An intensity calibration will work on only one side of crossover. You can calibrate one side of crossover based upon the users' most common practice. Alternatively, you can calibrate both sides of crossover provided that you have done the beam crossover calibration. See Beam Intensity for more details.
Spot intensity calibration: This calibration measures the relative intensity of the spots and is needed to allow an electron dose calibration at one spot to be transferred to other spot sizes. It should be done at an intensity setting that is within the calibrated range for all spots of interest. It is best done with no specimen. As with the beam intensity calibrations, you can do it on one side of crossover, or on both. See Spot Intensity for more details.
Beam shift calibration (Priority 1 on JEOL): This calibration allows the user to shift the beam by a controlled amount by placing a point on an image. It is essential on the JEOL for getting the beam moved correctly when image shift is used. Separate calibrations can be done in regular and low magnification modes. On the JEOL, separate calibrations are also stored for GIF mode and for different magnification ranges defined by the 'OtherShiftBoundaries' property. As of SerialEM 3.5, beam shift calibrations are also alpha-specific for microscopes that have an alpha setting, so you will need a calibration for each alpha value that is used. (Older calibrations will still work at any alpha.) Follow the procedure in Beam Shift.
Small screen factor: This is needed to get the same current readout with the small screen in and out. Fill the main screen with a moderately bright, uniform beam (5-10 na). Note the current reported in SerialEM. Insert the small screen. Compute the ratio of the current now to the current on the main screen. Go to the properties file and multiply the existing SmallScreenFactor by this ratio. Restart SerialEM and check that the current corresponds adequately now.
There is also a ScreenCurrentFactor that requires a Faraday cup measurement to calibrate. The screen current calibrations on Tecnais can be off by over 30%, so this is worth doing. If you determine the ratio between the current measured with a Faraday cup and the current reported by SerialEM, then multiply the existing ScreenCurrentFactor by this ratio.
C2 factors: This calibration is needed to make the C2 lens percentage for an FEI scope reported in SerialEM correspond to the values shown in Microscope User Interface. To do this calibration, first add the C2 lens readout to your MUI workspace. Then select Set C2 Factor in the Calibration menu and enter the C2 value at each spot size. Skip this for a Titan.
Tilt axis offset: This calibration is needed to shift the microscope image shifts so that they are centered on the tilt axis of the goniometer. Service engineers should be able to adjust the tilt axis to within about 1 micron of the optic axis, but if this has not been done, this setting will help to minimize movements in Y and Z when tilting. You need a specimen suitable for running the eucentricity routines with. Go to the center of the grid, run Eucentric - Both in the Tasks menu, then run Eucentric - Fine in the Tasks menu 2-4 more times. If the numbers reported for the lateral displacement are consistent, enter their average as the TiltAxisOffset in the properties file. This value has an effect only if individual users turn on 'Center image shift on tilt axis' in the Image Alignment and Focus control panel. If you do calibrate this setting, check it after the stage is worked on, as it can easily change. Note that if you have this option selected and you measure the offset with the eucentricity routine, you need to ADD the measured offset to whatever value is already present.
Setting Up X Ray Removal from Dark References (Priority 2)
The main task here is to determine the hot pixels and hot columns in the CCD so that these are not erroneously treated as X rays in a dark reference.
Transfer this stack and findhotpixels.com to a machine with IMOD 3.9 or higher. Edit findhotpixels.com to provide the name of the image stack, the name of a model file to place points in, a threshold for hot pixel strength, and a list of any hot columns that appear in the images, numbered from 0. Number the hot columns from zero. With a Gatan US 4000 camera you will need to exclude a large number of columns near the edges, 20 or more. Enter subm findhotpixels.
You will get a list of the hot pixels and their mean values in the log file. You can also look at the model on top of the images to verify that the program has found hot pixels. The log file ends with a series of lines of the form:
HotPixels X Y X Y X Y ...
Add these lines to your properties file. If you entered any hot columns, you will also see one or more lines listing them as:
HotColumns Y Y Y ...
Add these to the property file too. Uncomment all of the lines about DarkXRay... Set the DarkXRayAbsoluteCriterion to the threshold you set for Findhotpixels (but double it if images from a 16-bit camera were divided by 2). The MaximumXRayDiameter can be set to 6 for 15 micron pixels or 4 for 30 micron pixels, unless you want to analyze the situation further.
You can assess the performance of the X-ray removal with different criteria by reading your dark reference images back into SerialEM. After reading one, copy it to Buffer A, then select 'Fix Dark X Rays' in the Process menu. You can then compare the images in A and B. Turn on Administrator mode and select 'Set Criteria' in the Process menu to change the criteria. Copy the image back to A and run the removal again.
Measuring Camera Gain (Priority 2)
A camera property, CountsPerElectron, must be measured in order to calibrate dose to the specimen. One method of doing this is to add up the counts in an image that includes the whole beam and relate the counts to the screen current. It is only as accurate as the screen current reading itself, so ideally that should be checked with a Faraday cup. The following procedure applies to cameras generally; see the sections below for the procedures for a K2 Summit or K3 camera and for a Falcon 3 camera.
For a K2 Summit camera, the situation is complicated because counting mode gives a nonlinear response, and because counting mode only detects a fraction of the electrons (see Direct Electron Detectors, Especially the Gatan K2). In SerialEM 3.6, dose rate estimates based on electron counting images are all 'linearized' and should closely match the dose rate outputs in DigitalMicrograph. The program contains two tables of image counts versus dose rate output observed in DM, for 200 and 300 KV. As a result, counting mode images from a wide range of exposure levels give good dose rate estimates at the camera and can be used for calibrating electron dose at the sample, even if the counts per electron is not calibrated. Neverthless, it is recommended to measure the two gain-related properties as described here:
Here is a procedure for determining the counts per electron and for setting the ScalingForK2Counts so that linear and counting mode counts match at 7.5 electrons/unbinned pixel/sec, the middle of the useful range for counting mode.
This is at least the third version of these instructions. If you have values obtained with a previous version and you care to correct them, it is best just to redo the procedure. Again, your dose measurements with counting images will match those in DM even if you leave the values as they are.
For a K3 camera: Here the situation for counting mode images is simple. These yield 32 counts per detected electron by design, and recorded counts are linearized with a table, so the CountsPerElectron property is 32 by default and should not need to be changed. However, it is necessary to determine the scaling factor needed to make linear and counting mode images have the same counts in SerialEM. The procedure for this is:
For a Falcon 3 camera: The procedure for setting CountsPerElectron is, to first order, simple. Take an image in counting mode with frame-saving turned on and open the .xml file. Take the inverse of the value for CountsToElectrons and use that for the CountsPerElectron (it is typically ~105). It is not known whether there is loss in detecting electrons even at the lowest dose rates such as there is for the K2; if this becomes established or you have measurements indicating that it occurs, multiply the value by the efficiency factor (1 minus the fraction lost).
It is also important for some purposes to make linear mode and counting mode give the same number of counts; this is achieved with the camera property 'LinearToCountingRatio'. A procedure for estimating this is:
Stage and Imaging Stretch (Priority 2)))
These calibrations are important if the Navigator is going to be used to find marked locations after rotating the grid. Since the two stage axes do not behave identically, a calibration of the stretch in the stage coordinate system is needed to maintain accuracy when rotating the stage coordinates of marked locations. Having this calibration allows positions to be transformed accurately in the Navigator using only 2 or 3 registration points, and allows more accurate transformations when using the Align with Rotation dialog. The procedure for this calibration is described in Stage Stretch.
When using the Align with Rotation dialog, a stretch in the image projection makes it harder to align images. This stretch can be corrected by entering a property 'RotationStretchXform' for one or more magnifications. The program will use the property for the nearest magnification in the same mode if one is available; thus you would need property entries for one magnification in low-mag and one in regular mag mode if you want to have corrections in both modes. The procedure for obtaining this entry is as follows:
GIF Calibrations (Priority 1)
Before even trying to calibrate mags for your GIF, you may need to improve the EFTEM alignments that were supplied by FEI so that the field of view does not shift too much when you change mags. This is a tedious and difficult procedure but is worth figuring out how to do it well.
Once you have done that, you should do a separate calibration of image shifts and pixel sizes from the calibration on the upper camera (or at least do the image shifts and one pixel size.) SerialEM has some fancy logic for transferring calibrations from one camera to another, but I wouldn't rely on it except for test purposes. Do a calibration of autofocus at one mag first, because then you will be able to use autofocus to focus when you switch between mags. Then follow the procedure above for getting the image shift calibrations and grating pictures.
In addition, you will need to calibrate the magnification-dependent energy shifts. Not only does this provide more convenient use of the GIF, but it is needed so that various procedures can switch to lower mag when the slit is in and not lose the zero loss peak. Follow the procedures described in Mag Energy Shifts. It is best to select 'DM film shutter with beam blanking' to get consistent pictures, unless you are sure beam blanking is working right in your configuration.
GIF Properties (For the Sake of Completeness)
There are several properties for the GIF (see GIF properties.) The most important to check is the BiggestGIFApertureNumber, which is used to make sure that there is no aperture in the way when images are taken. In addition, there are properties to specify delays when inserting or retracting the slit or changing energy offsets. These timings may be OK, but here are some notes on how they were obtained.
For testing the adequacy of the delay on removing the slit:
For testing the delay upon energy shift:
Setting Up STEM
All of the property file entries used to configure STEM usage are described in either the STEM Camera Properties section of Properties for one camera or in STEM properties. See those sections for full details on the properties that are mentioned below.
Detector Property Entries. The CameraProperties section for the STEM camera should list all of the detectors whose access can be controlled by the program. There should be a ChannelName entry for each detector; this is the name that will appear in the Camera Setup dialog.
For FEI STEM, there may also be DetectorName entries with the official names of the detectors, if you do not want those names to appear in the dialogs. For example, in some cases the official name of the HAADF detector is 'HAADF Detector' and properties 'ChannelName HAADF' and 'DetectorName 0 HAADF Detector' would be used to have the name appear just as 'HAADF'. In one case, an external switch was used to select between bright and dark field detectors, and whichever one was selected fed into the FEI bright field channel. These detectors were listed together as the second channel with 'ChannelName BF/DF' and the entry 'DetectorName 1 Bright Field' was needed to access the signal correctly.
For FEI STEM, there is no direct control over the insertion of detectors; the only way to get the HAADF detector inserted after coming into STEM mode is to take an image that uses that detector. The program will take an initial dummy picture to insert the detector if there is a 'NeedShotToInsert' property that lists this detector; 'ShotTimeToInsertDetector' controls the delay between this dummy picture and the real acquisition.
For DigiScan in JEOL, unless DM itself manages the insertion and selection of detectors, the detectors must be managed through the JEOL interface. The ChannelName entries for such managed detectors must be placed before the entries for any unmanaged detectors. Their JEOL IDs must be listed with the ImageDetectorIDs property (in the same order as their ChannelName's appear). Needed delays are set with InsertJeolDetectorDelay and SelectJeolDetectorDelay. If one channel in DigiScan receives signals from more than one detector, depending on which one is selected, then this mapping should be described with a MappedToDSchannel property that gives the channel number in DigiScan followed by the detector numbers that feed into that channel. Also, if the detector number (in the ChannelName list) of any remaining detector does not match its channel number in DigiScan, then there needs to be a MappedToDSchannel entry with this detector number and DigiScan channel number. Even if each detector has its own channel, this could happen if the detectors managed by the JEOL appear after unmanaged ones in DigiScan.
For either type of STEM, one can also declare that certain detectors cannot be used together by listing their numbers on a MutuallyExcludeDetectors entry. Detectors already listed in a MappedToChannel entry are automatically considered mutually exclusive so there is no need for another entry about them. Together, these two kinds of entries determine the number of detectors that can be used simultaneously and thus the number of channel combo boxes that appear in the Camera Setup dialog.
For DigiScan in JEOL, the DetectorBlocks entry should be used if a detector managed by the JEOL physically blocks other detectors; it will cause the blocking detector (listed first) to be retracted when any one of the other detectors is selected. Retraction is not done automatically just because some detectors are mutually exclusive, because this might not be needed.
Screen and Camera Management Properties. Because of the diversity of STEM setups, there are a host of confusing properties to control the behavior of the screen and CCD cameras, which may be selected by preference or by necessity. These consist of LowerScreenForSTEM (which may be used either to lower or to raise the screen, depending on the sign), MustUnblankWithScreen, RetractCameraOnEnteringSTEM, and the Order settings in the CameraProperties sections. Here are some examples:
Magnification Table. You should run List Mags in the Calibration menu even if you are starting with a property file containing a STEM magnification table. If you are inserting a table into the property file from scratch, precede is with line with 'STEMMagTable' and the number of magnifications listed. If you are substituting one, be sure to change, be sure to adjust the number on the 'STEMMagTable' line. For an FEI scope, see the advice in List Mags about whether to turn on the 'Enable LMscan' option in the microscope STEM interface and include all of the LMscan magnifications. If you change your mind about this after doing calibrations and decide to change the magnification table, you would have to edit all of the relevant magnification indexes in the calibration and property files. On a JEOL, if you do not see a correct magnification readout in SerialEM after ensuring that the magnification table is correct, you may need the JeolSTEMmagUnitsAreX property.
Binnings for DigiScan. The DigiScan can take square, full-field images with almost any chosen number of pixels up to the maximum (8K by 8K). SerialEM uses the 'binning' selection to set the number of pixels. The binnings are obviously constrained to be integers, but otherwise they can be arbitrarily chosen to provide whatever selection of image sizes you find convenient. For example, if you have no use for 8K images, you could leave out binning 1, or you could set the camera size properties to 4096 instead of 8192.
Camera Timing. Run the Camera Timing command in the Calibration menu, accepting the default parameters for exposure, binning, and number of test images. At the end, it will indicate values to be entered for the properties AddedFlybackTime and StartupDelay in the CameraProperties section for the STEM camera. For FEI STEM, the added flyback should be substantial, but applies only to these acquisition conditions. For Digiscan, the added flyback should be small but is important for keeping DM from crashing.
For Digiscan, as of SerialEM 3.3.1, it should not be necessary to adjust DigiScanExtraShotDelay to prevent crashes in DM, and it can be left at its default of 100 ms.
Rotation angle properties for DigiScan and JEOL. One or two
properties should be set to ensure that future sessions are run under the same
conditions as when calibrations were done. With a DigiScan, open the
DigiScan Setup Dialog, and press Advanced to open the DigiScan
Configuration dialog. There needs to be a general property entry
DigiScanFlipAndRotation n d
where 'n' is 1 or 0 depending on whether 'Flip Horizontal Scan' is checked or not, and 'd' is the value in the 'Rotation Offset' text box. SerialEM cannot affect these setting in DigiScan but will warn on startup if they do not match the values in this property setting. On JEOL, there need to be a general property
where 'd' is the setting for rotation angle in the JEOL STEM user interface. SerialEM will restore the rotation angle to this value when it starts.
Initial Rotation Angle Setup. SerialEM will assume that all images are taken with the scan parallel to the tilt axis, so that dynamic focus can be used effectively. One goal of the steps followed here is not just to measure the rotation angle of STEM images, but also to adjust it so that this assumption is satisfied. The RotationAndPixel and ExtraRotation camera properties are used to determine how to rotate the scan to make it parallel to the tilt axis.
Rotating to the tilt axis, part 1. If the direction of the scan is not somewhere near parallel to the tilt axis, it should be rotated first so that you can do the next two steps correctly. Before you start, make sure that the camera properties contain 0 on the ExtraRotation line and do not have RotationAndPixel lines with non-zero rotations (at least at the magnifications you will use). Take a CCD camera image at a magnification where you know the approximate angle of the tilt axis and find some recognizable features oriented along the tilt axis. Take a STEM image that shows those features. You want to have those features oriented approximately horizontal in the STEM image. Place a value into the 'Added rotation' box of the STEM Control panel to achieve that orientation within about 10 degrees. Do the next two steps with this value in the 'Added rotation' box (beware, the value will go away when you restart the program).
Choosing whether to rotate. You need to make an initial decision about whether to have STEM images rotated in SerialEM so that their orientation is approximately the same as that of images on the viewing screen or CCD camera. Such a rotation needs to be imposed before calibrations are done, because the calibrations are valid only if images are at the same orientation as when calibrations were done. If there are multiple users with different preferences in this regard, they would have to access different property and calibration files when running the program.
If you choose to rotate images, then first take a CCD camera image at a
magnification where the rotation is typical for your data acquisition.
Next, take a STEM picture of the same area so that you can determine how much
the STEM image needs to be rotated to match the orientation of the CCD image,
rounded to the nearest 90 degrees. Then add a camera property:
where 'n' is 1 for 90 degrees counterclockwise, 2 for 180 degrees, and 3 for 90 degrees clockwise. Also add the camera property:
where 'd' is the number of degrees of rotation imposed by this operation.
Checking header angle. Whether or not you rotate images, you need
to check that the tilt axis rotation angle stored in file headers is correct.
Save a STEM image to a file, selecting the option in the File Properties dialog
to save metadata in a 'mdoc' file. Open the .mdoc file in Notepad and
observe the tilt axis rotation angle there. You need to determine whether
this angle is about the same as, or 180 degrees away from, the angle that a CCD
image of the same orientation would have. If you can take a CCD image at
about the same orientation, then the tilt axis rotation angle of that image can
be compared directly with that of the STEM image. If CCD images have a
different orientation, add the tilt axis rotation angle of such an image to the
angle that a CCD image would have to be rotated to match the STEM image, and
compare this sum to the angle for the STEM image. If angles are off by 180
degrees, then either add +/-180 to an existing ImageRotation property, or add
the camera property
Rotating to the tilt axis, part 2. Next, you need to determine what value placed into the 'Added rotation' box of the STEM Control panel will make the scan parallel to the tilt axis. Before you start, make sure that the camera properties contain 0 on the ExtraRotation line and do not have RotationAndPixel lines (or if they do, make sure there is an absolute rotation equal to 0 at the magnification you are going to use). To proceed, take a CCD camera image at a magnification where you know the tilt axis angle (either from the angle in a file header or from the RotationAndPixel and ExtraRotation properties for the camera). Copy this image to the Align buffer so that it can be compared easily with images in buffer A. Take a STEM image of the same area at a comparable scale (if you are using a cross-line grating, it is not necessary to find the same area). You can find the rotation that makes the STEM image match the CCD image in two different ways. You can estimate the amount that the STEM image needs to be rotated, put that into the 'Added rotation' box, take another image and use it to adjust the estimate, repeating until the images match adequately. Or, you can find two features to draw a line between in both images and get an angle for each image (press Shift, click and drag with the left mouse button; the angle will be reported in the status bar and in the log window). The angle to rotate is the angle in the CCD image minus the angle in the STEM image. After you find the rotation that makes the images match, add the amount that a CCD image would need to be rotated to bring the tilt axis to the nearby vertical or horizontal axis (e.g., 4 degrees for a Tecnai F20). Take another image with this total rotation to verify that it brings the tilt axis near vertical or horizontal. Place the negative of this total rotation in the ExtraRotation camera property and restart SerialEM.
Pixel Sizes and Rotations. Now you are ready to calibrate image shift, pixel size, and rotations for whatever range of magnifications you will need for taking tilt series and running relating tasks. Because image magnification and angle varies with binning, you should set up the Record parameters for whatever binning is going to be most typical for data acquisition (presumably this will be 1K or 2K images). Go to a magnification where the field of view is about 9 microns (20 blocks of the grid). Set the exposure time long enough to avoid significant image stretching due to a scan rate too high. Do this by taking an image with a long exposure (e.g. 8 seconds), putting it in the Align buffer for easy comparison, and then taking images with shorter exposure times to find the point at which stretching becomes obvious. On an FEI the scan rate may need to be under 0.5 micron/msec; on a JEOL with DigiScan it can be higher. Then set up the Trial parameters for 512x512 pixel images and set the exposure time to give a similar or lower scan rate. An alternative to this procedure is to set the property UseTrialBinningSTEMshiftCal to 1 and set up the Trial parameters for a 1Kx1K image, if it seems like a shift calibration from 1K images will be more representative.
Use the cross-line grating and focus it. Start at the lowest magnification you want a pixel size for; it can be lower than the one used to set the exposure time. Do these steps at each magnification:
At the end, run List Relative Rotations. This will put the relative rotation angles and pixel sizes into RotationAndPixel lines that can be inserted into the properties file, just as with a CCD camera. If you saved images for analyzing higher magnifications, then determine pixel sizes and relative rotations from them and complete the RotationAndPixel entries.
Set the ExtraRotation to 0 and insert the value that was present there as an absolute calibrated angle on one of the RotationAndPixel lines (preferably the one for the magnification where you first determined that angle).
In principle, you can refine these rotation angles later by analyzing a tilt series in IMOD. The rotation angle solved for by Tiltalign indicates the tilt axis angle in the images. (Alternatively, a stage calibration at the right magnification could yield an accurate enough value). Either insert this angle into the ExtraRotation line or add it to one absolute calibrated angle on a RotationAndPixel line. (On an FEI scope, the latter should be done if you intend to calibrate microprobe mode too.) Run SerialEM in Administrator mode and recalibrate one image shift as carefully as was done above. Accept the offer to change all other image shift calibrations.
In practice, this detailed calibration of angles is probably worth doing with FEI STEM but is of questionable value on a JEOL with DigiScan. The problem is that the actual scan rotation changes in discrete steps of 1-2.5 degrees, not continuously. The calibrations above may correct some of the larger rotations between magnification steps but probably not the small ones.
Focus-Related Calibrations. The autofocus routine needs some idea of how fast the beam spreads as focus is changed. The relation between Z height and focus must also be calibrated for various purposes, particularly for dynamic focusing.
On a JEOL, you must first determine and set the property JeolSTEMdefocusFactor. In STEM mode, note the focus readout in the JEOL interface and press Reset to reset the defocus in SerialEM. Change the focus by about 20 microns. The needed factor is the change in readout in the JEOL interface divided by the focus readout in SerialEM. Insert this factor into the Properties file and restart SerialEM.
Make sure the specimen is focused and the Focus parameter set takes good pictures. Then run the Autofocus command in the Calibration menu. Accept the defaults for the two queries; if the routine reports a problem, check the help for that command. After this calibration is run, the autofocus routine should work. Verify this by changing focus by a few microns and autofocusing.
Next, run the STEM Focus Vs. Z command in the Calibration menu, using default parameters unless some trouble arises. The program will step through Z and focus at each Z level. At the end it will indicate the slope of the relationship between Z and defocus over several portions of the range. Use this slope to set the property STEMdefocusToDeltaZ. On a JEOL, use either the value from the fit to the middle of the range, or the value over the whole range if the first and second halves give similar values (within a few percent). On an FEI scope, use the value from the fit to the middle of the curve; note that the whole curve is saved as a calibration as well. This curve is specific to the current spot size. In order to have the correct slope and curve applied when using dynamic focus with FEI STEM, you need to run this procedure at every spot size where dynamic focus might be used.
Flyback Times for FEI STEM. To use dynamic focusing with FEI STEM, you will need to calibrate the flyback time a number of times, because it depends on exposure time, binning, subarea size, and magnification. The flyback time is obtained from the camera timing routine, but it is run in a special mode with the Quick Flyback Time command in the Calibration menu. In this mode, the number of pictures is kept to a minimum, and resulting flyback time is stored automatically in a file. See Quick Flyback Time for more information, advice, and instructions on running this command with a script for a series of exposure times.
Microprobe mode on FEI. The magnifications, pixel sizes, image shift, and focus-related calibrations are all stored separately for microprobe mode and nanoprobe mode. If you are going to use microprobe mode, you need to repeat steps above starting with Rotating to the tilt axis and continuing with Pixel Sizes and Rotations and Focus-Related Calibrations. Note that the magnification indexes for microprobe mode are all higher than the ones for nanoprobe mode. The slope of the relationship between defocus and Z in microprobe mode is entered as a second number on the STEMdefocusToDeltaZ property. If you refine the rotation angle calibration with an angle from tilt series alignment or an accurate stage calibration, be sure to add the refinement to an absolute calibrated angle on a RotationAndPixel line instead of modifying the ExtraRotation entry.
MaximumScanRate entries. If you add a property defining a maximum scan rate (see STEM Camera Properties for details), there are two effects. 1) A button becomes available in the Camera Setup dialog to increase the exposure time to achieve this scan rate and thus obtain images with a predictably limited amount of distortion; 2) Exposure time will be increased if necessary in lower magnification tracking tasks in order to limit the scan rate to this maximum. It is not known whether the latter feature is important for accurate performance of tasks, or whether they will perform adequately with distorted images, so it is difficult to say whether this entry is needed. However, you should keep this in mind as a possible solution if tracking problems do occur with distorted images. You can assess the kind of scan rate needed by experimenting with, say, 1Kx1K images of different exposure times to see what scan rates give signification shifts and distortions. Usually such features begin to appear with rates in the range of 0.5-1 micron/msec.
Final Tasks (Priority 1)
When you are finished setting things up, check the settings in the system (default) settings file. Run 'Open' in the Settings menu and load the file SEMsystemSettings.txt from the C:\ProgramData\SerialEM or C:\Program Files\SerialEM folder. Check each of the camera parameter sets. If the capture areas are wrong (too big, too small, not centered), or the binnings are not appropriate for the camera, correct them. You can change any other settings that you think appropriate. Exit SerialEM, or just select Save in the Settings menu.
If you only want to use one set of SerialEM settings, just use the shortcut provided in C:\ProgramData\SerialEM\ or C:\Program Files\SerialEM and copy it to the Desktop or whatever location works best for you.
If you prefer to have different settings per user/application loaded automatically at SerialEM startup, create a subfolder for each set of settings (preferrably in C:\ProgramData\SerialEM\UserSettings\ or C:\Program Files\SerialEM\UserSettings\) and create shortcuts on the Desktop using these folders as described in Shortcuts, Command Line Arguments, and Administrator mode.
Obsolete Tuning of Camera Timing (For the Sake of Completeness)
If you want to measure the BuiltInSettling exactly, you need a two-channel oscilloscope, two BNC cables, and two BNC tees. Connect the standard and alternate shutter outputs on the camera controller to the two scope inputs. Display the alternate shutter above the standard one. The alternate shutter is high (5 V) when it is closed and drops to open. The standard shutter behaves the same for an upper camera and is inverted for the GIF shutter, i.e. low when closed then high when open. Set up for triggering on the downward phase of the alternate shutter. In DM, take a picture with standard shuttering and 0.5 second exposure, then take another, which will not require a dark reference. You should get a pattern similar to the first picture shown inImage Acquisition , except that the traces will be upside down. First the beam shutter opens while the standard shutter closes; then the standard shutter opens again for the 0.5 second duration. Your goal is to measure the time between the opening of the beam shutter and the re-opening of the standard shutter to within 20 ms. (Note that if you have the standard shutter connected to the beam shutter and the camera configured to have standard shutter normally closed instead of alternate shutter normally closed, you will see the same behavior but with the two traces swapped.)
The ExtraUnblankTime is relevant only if beam shutter control is broken (DM 3.6.0 - 126.96.36.199). It would be adjusted by taking 0.1 sec exposures with 'DM film shutter' (which will have constant means) then taking exposures with 'Dual shuttering' (which will vary). The ExtraUnblankTime is adjusted to make the 'Dual shuttering' exposures have the same mean, on the average, as the 'DM film shutter' exposure.
The ExtraOpenShutter time can be assessed with the oscilloscope set up as described above. Set this entry to 0 and restart SerialEM. Set up an exposure with 'Dual shuttering' and drift settling longer than the clear time, e.g. 1.3 seconds. Watch the shutters during an exposure. The beam shutter will open more than 1.3 seconds before the film shutter - the amount extra is the ExtraOpenShutterTime.
Setting Up for a Separate Voltage
Here is a procedure for setting up the program to be used extensively at a different voltage. It assumes you have a 300 kV scope and want to use it at 200 kV. Note that this procedure was changed in version 3.3.1 so that multiple settings files are no longer needed.
Now when you click on the new shortcut, the program will add the argument on the 'Target' line to the system path entry in the settings file and access the properties and calibrations in the 200KV folder. Be sure to make an unbinned gain reference at the lower voltage before trying any calibrations. Then, you can calibrate image shift, stage shift, autofocus, etc. You will also need to adjust the pixel sizes and rotations in the property file.
Each user who wants to use the program at that voltage will need to have the same separate shortcut, with '/200KV' added to the 'Target' line.
Be aware that the 'SeparateGainReferenceKVs' entry causes the kV to be added to the gain reference filename, so when you first add this entry any previous references will be unavailable (unless you rename them), and if you ever comment out the entry the kV-specific references will be unavailable (unless you rename them).
Setting Up to Use Nanoprobe TEM on an FEI Scope
The program can be used in nanoprobe as well as microprobe mode on an FEI scope. The probe mode is recorded along with other illumination settings as part of the Low Dose parameters, in states saved in the Imaging State dialog, and as part of the acquisition state for Navigator maps. There are also script commands to set and report the probe mode. However, because illumination conditions are so different between the two modes, numerous SerialEM calibrations are kept track of separately for nanoprobe and microprobe mode. Some or all of these calibrations will need to be done in nanoprobe mode to use it effectively, depending on the application. The calibrations include:
When the microscope returns to one of the probe modes, it reimposes a number of settings that were present when it was last in that mode. This includes not just the illumination conditions (spot size and intensity) but also image shift, defocus and beam shift. Each of these is handled differently.
Additional beam shifts can be set for low dose areas. These are handled by removing the beam shift for the current area before a probe mode change, then applying the shift for the new area after the change. (When there is no probe mode change, the change in additional shifts between the two areas is applied after all other changes, as usual.)
To center the beam independently in the two modes, set up Trial parameters for a condensed beam that can be centered, turn on 'Continuous update of Mag and Beam', and change between the modes with a script or in the microscope interface.
If you already have different Low Dose modes set up to use different probe modes, you can also adjust beam position in each probe mode by the following procedure: 1) Zero out the addition beam shift in each Low Dose mode. 2) Center the beam on one Low Dose mode. 3) Change to the other probe mode with a script or in the microscope interface. 4) Go to the other Low Dose mode (by taking an image or by dropping the screen) and center the beam there. 5) Switch back to the other probe mode. 6) Go back to the other Low Dose mode. After establishing the basic beam position in each mode with this procedure, you can then apply additional beam shifts as necessary.
Adding an NVIDIA card to a K2 Computer
If you are using the frame alignment module in the SerialEMCCD plugin to DigitalMicrograph for aligning K2 frames, you can speed up this processing by using the GPU of an NVIDIA card added to the computer. Because most of the processing is done as frames (slowly) become available from DM, the speed gains from the GPU are modest, about 0.4 second per frame for super-resolution frames and 0.1 sec per frame for counting mode frames. For example, with a Quadro M4000, acquiring and aligning 14 super-resolution frames takes 17.2 sec with CPU and 12.3 sec with GPU; 14 counting mode frames take 9.4 sec with CPU and 8.0 sec with GPU. The speedup is very similar with a GeForce GTX 960. If you are using the option for frame alignment in IMOD, the speed gains with a GPU are more substantial, about 2-3 fold. Most of these gains can be achieved by mid-range cards and it is not necessary to have one of the most powerful cards. Specifically, there is no need to have a dedicated GPU card, so the NVIDIA card can serve as the graphics card and substitute for the ATI card that comes with the computer.
A typical arrangement of cards in the K2 computer is:
Slot 7: PCI-E 3.0 x8
SATA to eSATA Bracket
Slot 6: PCI-E 3.0 x8
Slot 5: PCI-E 3.0 x8
Slot 4: PCI-E 3.0 x16
Slot 3: PCI-E 3.0 x8
Slot 2: PCI-E 3.0 x8
Slot 1: PCI-E 3.0 x8
Slots are numbered from the bottom as in this table. There are two basic options: 1) get a single-height card, which can be substituted in slot 4 without any other rearrangements; 2) get a more powerful or cost-effective double-height card, which must occupy slots 3 and 4 and requires having one free slot and rearranging other cards. If you have no free slots, you may find that one of the cards is a Firewire card with nothing connected, which you can remove to free up a slot. Slot 7 is too short to fit anything else useful.
The constraints when installing an NVIDIA card are these:
1) If you get a single-height card and your graphics card is already in slot 4, the process is simple; just substitute the card. Unfortunately single-height cards have limited capability. The best ones available as of Dec. 2016 are all Quadro cards, which all have worse price/performance ratios than GeForce cards. The choices are:
|K1200||$300||512||4 GB||80 GB/s||45 w|
|M2000||$450||768||4 GB||106 GB/s||75 w|
|M4000||$800||1664||8 GB||192 GB/s||120 w|
The M4000 has about half the performance of a GeForce 980 Ti, for example, but because of the way that the frame alignment works, the speedup is far from proportional to increased card capability. More data are needed to say what card is most worth getting.
2) If you want to get more performance for the money with a double-height GeForce card, you must move a card out of slot 3, which will typically be a NIC. This NIC must stay on processor 1, not be moved to slot 6 if it is empty. Some possibilities are
In any case, you must reconfigure the NIC after moving it. Access the configuration with Control Panel - Device Manager - Network adapters, click on Myricom Myri-10G Ethernet Adapter and switch to the Advanced tab. Check the settings for each of the 4 adapters against this reference before moving the card. Afterwards, you will need to restore two of them:
IP Addresses: - LOWER NIC: 192.168.211.1 (set name to 'K2 Base') 192.168.211.2 (set name to 'K2 Lower') - UPPER NIC: 192.168.211.3 (set name to 'K2 Upper') Device Settings: Adaptive Interrupt Moderation (AIM): Disabled AIM Max Idle Time: 10 AIM Max Period: 0 * Custom RSS Hash: IPv4 Degraded PCI-E Link: Denied Flow Control: Off * Interrupt Coalescing Delay: 500 IPv4 Checksum Offload: Rx Enabled Large Send Offload v2 (IPv4): Enabled Large Send Offload v2 (IPv6): Enabled Locally Administered Address: Not Present Log Link State Event: Enabled * MTU: 9000 * Receive Buffers: 16384 RSS: Enabled * RSS Queues: 8 Strip VLAN Tags: On TCP Checksum Offload (IPv4): Rx & Tx Enabled TCP Checksum Offload (IPv6): Rx & Tx Enabled UDP Checksum Offload (IPv4): Rx & Tx Enabled UDP Checksum Offload (IPv6): Rx & Tx Enabled VLAN ID: 0 * Denotes a parameter modified from default value.
You also need to install NVIDIA drivers downloaded from the NVIDIA web site. You can do this either just before or just after the card swap.
Unplug the computer after turning it off. You should use a grounding strap or other anti-static precautions while transferring the video card from its protective packaging to the computer.
Copy the file FrameGPU.dll from the current SerialEM package folder to C:\ProgramData\Gatan\Plugins. The SerialEM installer will update this file when you upgrade. You also need to download compatible CUDA runtime libraries (currently cudart64_41_28.dll and cufft64_41_28.dll) from the Tools folder on the SerialEM download site and place them in the same Gatan Plugins folder. These files are not included in the SerialEM package because of their size.
There are several script commands that allow taking pictures on film. One problem encountered on Tecnais is that the display may not recover from the automatic screen dimming unless you move the mouse. You can solve this by editing the registry. From the Start menu, select Run and enter 'regedit'. You want to find the key 'HKEY_LOCAL_MACHINE\SOFTWARE\FEI\BrickBox\Configurations\tem\default\MdlScreenDim\MdlScreenDimMgr\ScreenDim' You can use 'Ctrl-F' and F3 to search for the text 'ScreenDim' until you find an entry under 'MdlScreenDimMgr, although this is tedious. In Tecnai version 2 (Windows 2000), the key 'PowerSaveSupported' already exists under 'ScreenDim': double click on it, or right click and select 'Modify', then change its value from 1 to 0. In Tecnai version 3 (Windows XP), you need to add the key. To do this, right click on 'ScreenDim' in the left panel (the tree display) and select 'New - DWORD value' Then change the name of 'New Value #1' to 'PowerSaveSupported' and leave the value as 0.
On the Tecnai, it is also possible to set a delay between the loading of the plate and the exposure, and to have a pre-exposure of the specimen before the film is exposed. To access these features, the server module 'adaexp.exe' must be installed. This module is used by Leginon, so if you have Leginon, you are all set. Otherwise, the right version of the module for your microscope needs to be obtained from Max Otten at FEI. (The wrong version will do bad things like disable the HT until the computer is rebooted.)