This site documents the most basic aspects of setting up and using Instamatic to collect 3D ED data on Ernst Ruska-Center's FEI TITAN 300 keV TEM. It has been prepared as a supplementary material for the WiSe-2026 Workshop. For more information about Instamatic itself, please refer to its documentation.
Like many other electron microscopes, ER-C's Titan is controlled by a computer running Windows XP as its operating system. This materials will refer to this computer as "Microscope PC". Due to the limitations imposed by its operating system, many modern programs and libraries, including Instamatic, cannot run on this computer. Instead, Instamatic GUI configured to control this computer is installed on a more modern computer located in the laboratory. This computer, called henceforth "Support PC" is located on the desk left from the microscope. As it is operated by Windows 11, it can handle most modern software.
The overall configuration of Instamatic for ER-C's Titan resembles that shown on Example 1 in Instamatic online documentation. Rather than being controlled directly by the same process as the GUI, the instructions sent to the microscope pass via a helper program, instamatic-tecnai-server, installed on the Microscope PC. In contrast to Example 1, in Julich the camera is also controlled remotely via another process of instamatic-tecnai-server, run separately from the process controlling the TEM. As a result, every instruction sent to the hardware from the GUI running on the Support PC is first packaged, sent to the Microscope PC, and then unpackaged and evaluated by the Tecnai server. Likewise, the results are sent via network by the Microscope PC server to the Support PC GUI.
The server-client architecture of Instamatic has some benefits and drawbacks. Decoupling hardware control from the GUI significantly increased program stability: in case of any issues, the GUI can be killed without any major risk for the hardware, as the servers will keep performing given operation. Exceptions are handled, logged, and presented without disrupting the work. On the flip side, communicating via network introduces some lag and can introduce significant delay and limit throughput, especially in case of the streaming camera image, which for a 512 x 512 pixel camera takes as much as 1 MB.
The FEI Titan 80-300 TEM is a high-resolution transmission electron microscope (TEM) equipped with a field emission gun and a corrector for the spherical aberration (CS) of the imaging lens system. Digital images are acquired with a Gatan 2k x 2k slow-scan charged coupled device camera. The instrument is used for the investigation of a wide range of solid state phenomena on the atomic scale, but mostly high-resolution transmission electron microscopy (HRTEM) utilizing negative spherical-aberration imaging (NCSI) technique. The machine can be adapted to utilize low temperature holders and external electric/magnetic fields. It is moderately suited and occasionally used for diffraction studies (text adapted from ER-C website).
This section lists all the steps necessary to start a diffraction experiment on the Titan from its default configuration. The information in the parenthesis following the instruction specifies in the part of FEI GUI or hand panel where the control is located.
Open column valves (Vacuum » Vacuum)
Load 300kV TEM C3-off registry to set the basic alignments (Vacuum » FEG Registries)
Select and apply available 300kV alignments (Align » Alignments » File)
Set the highest available gun lens setting of 8 (Vacuum » FEG Control)
Set one of the higher available spot size settings, at least 6 compared to the default of 3 (Column » Beam Settings)
The highest available gun lens and spot size settings warrant the lowest intensity of the incident beam. This lowers the amount of damage dealt to the sample and the detector while still sufficing for the diffraction method. Setting FEG registry also automatically resets the apartures and removes the camera from the column. In order to bring it back at any time, select "Camera » CCD/TV Camera » Insert" or start any acquisition from the Digital Micrograph window.
After loading the registry and setting all the initial alignments, the beam should be visible at one of the lowest magnification settings e.g. SA 3400x. If the beam is not visible on the fluorescent screens, it may be shadowed by a part of the sample grid (move joystick) or blanked (Camera » CCD/TV Camera » Blank). In case the beam can still not be found, request assistance of the laboratory staff.
Continue to refine the basic loaded alignment:
Set a magnification level for the diffraction experiment e.g. SA 11500x (hand panel)
Navigate to the direct alignments (Align » Direct Alignments)
Throughout the alignments, keep the beam focused using the "Intensity" knob.
To start the following alignments, select them on the list. To finish each alignment, switch to another one or click "Done". Preferably, perform these alignments on the little fluorescent screen, lifted using the lever left of the viewing chamber.
Calibrate the beam tilt pivot points X and Y by overlapping the split beam components using the Multifunction X/Y knobs and correcting for the beam shift as needed using the track ball
Calibrate the beam shift by moving the beam to the middle of the screen using the track ball
The rotation center calibration may be performed but is difficult to perform using the tools provided and as such typically not worth it.
Switch to the lowest available condenser i.e. 50 (Column » Apertures » Condenser 2). After performing listed alignments, the beam may be a bit elliptical i.e. astigmatic. Astigmatism of the beam should not be judged on the little screen as it is tilted. To correct for it, switch to the large fluorescent screen or the camera and:
Navigate to the stigmator and select "condenser" (Camera » Stigmator)
Use Multifunction knobs to make the beam circular
Switch the stigmator back to "None"
Stigmator correction might require repeated calibration of the beam shift. If time allows, it may be a good idea to repeat all manual alignments altogether to warrant high quality.
Once the beam is circular and spreads concentrically, proceed to look for a fine crystal for measurements. Once a suitable i.e. clear, uniform, and semi-transparent candidate is found, determine the correct eucentric height and save the stage position:
Navigate to and start the wobbler with low angle (Stage » Control » Alpha Wobbler)
At increasing wobbling angles, minimize sample movement using the hand panel Z-height buttons
Once the crystal stops drifting with alpha, add or update the stage position (Stage » Stage 2)
The stage tilt has an upper practical limit of 50 degrees, but to keep the drift managable it is advised to stay within 20 to 30 degrees. There is some backlash on the alpha angle, which at the time of writing is not accounted for in the software.
In order to identify the beam size:
In the Digital Micrograph GMS GUI window, create any view and start any acquisition
Once an image is collected, from the toolbar select a "profile" tool
Click on both sides of the displayed beam
Click the edges of the new beam profile histogram to calculate the spacing between them
Always make sure the direct beam does not shine directly on the camera! To position the diffracted beam initially, lower the small fluorescent screen, switch to diffraction mode (hand panel), insert the beamstop (left side of the chamber), and shift the direct beam under the thick part of the beamstop shadow.
Finally, use the "Focus" knob to sharpen the diffraction peaks at the 330 mm camera lens, or any other suitable for the experiment.
Make sure the microscope, the microscope PC, as well as the support PC are all turned on and available. On the microscope PC:
Open two command line windows and navigate to `Q:\DanielT\instamatic-tecnai-server`
In one window, call `start_tem_server.bat`
In the other window, call `start_cam_server.bat`
Newly opened windows will report readiness by logging `Initialized microscope/camera titan server thread`. Full logs can be found (and removed, if needed) in the same instamatic-tecnai-server directory.
On the support PC:
Open a command line window and navigate to D:\Titan_data\DanielT
Activate the virtual environment: `conda activate Instamatic`
Start the program by calling `Instamatic`
The graphical interface should automatically connect to the microscope and the camera and open a GUI with a live-view on the screen.
Long-term calibrations have been already done and saved in the %appdata% directory. They should need to be repeated. However, some experiments and functionalities require a recent beam shift calibration that translates between `beamshift` settings and detector pixel coordinates. This calibration, if needed, should be stored in the calib folder of the current experiment directory.
In order to manually prepare a new beam shift calibration (automatic process was semi-successful):
Prepare the microscope configuration: set desired magnification and spot size, move the beam to the camera center, and focus it as much as possible
Create a new directory `calib` inside your current experiment directory (e.g. `D:\Titan_Data\DanielT\2026-01-06\calib`)
Open a command line window and navigate to the newly-created directory
Activate the virtual environment: `conda activate Instamatic`
Start `instamatic.calibrate_beamshift` and confirm the calibration.
It is preferrable but not necessary for the beam to be visible in all the points on the detector. After the calibration is started, the beam will move to `gridsize**2` individual positions on a square grid, spaced apart by `stepsize` beam shift setting values each, collect, and save an image in each. Using cross-correlation between the images, the program will calculate the transformation matrix that will be saved in a newly created `calib_beamshift.yaml` file.
The values of `gridsize` and `stepsize` have been previously estimated to provide rapid and accurate calibration. By default, these are equal to 5 (amounts to 25 grid points) and 2.5E-6. The values can be modified by editing the `%appdata\instamatic\config\camera\ultrascan.yaml` settings file.
Instamatic is a composite software consisting of microscope and camera servers, calibration, scripting, and experimental routines. The easiest way to make sure it handles the connection to TEM as intended is via the "Control" frame. In this frame, the user can change alpha angle and induce its wobbling, set stage speed setting, move the stage, and toggle some of the beam characteristics.
When starting work with Instamatic for the first time, it is a good idea to play a bit with the control frame to feel out how does the microscope react to the changes. In particular, some of the features i.e. the magnification mode might not work properly depending on their implementation on the server. Nonetheless this frame acts as a good place to confirm the connection works as intended.
In a simplest experimental scenario, when no tracking is required and stills in equal intervals is all that is needed, a simple RED experiment will do the trick. This experiment can be run using two different experimental frames, "RED" and "FastADT", the former being the simpler one. In general, Instamatic experiment functionality is split across these frames, typically each of which has been prepared by a different author for unique purpose.
In the RED routine, the user can only set three parameters: exposure time, tilt range, and step size. Upon starting a RED experiment, the stage will march tilt range in positive direction, collecting a still diffraction image every step, finishing "range" degrees away from its start position. It offers no tracking nor complex control capabilities. This offers a simple way to test whether the program can record experiments correctly.
The cRED frame offers the original Instamatic experience. Designed for stages that feature smooth but irreproducible float, cRED frame can be used to collect an experiment where the crystal drift is tracked manually using beam shift. Diffraction data is collected and stage is rotated continuously, the former ends with the click of the button, and the latter automatically. For the best quality of data, it is advise to try to finish both movements at the same time.
The cRED frame has been originally designed for a JEOL microscope, where the stage can be rotated using dedicated foot pedals. It can be without any tracking, but if one is desired, it has to be manually switched on. Beam shift position can be then controlled using either the track ball (requires some experience) or using control frame option to move the beam using Right Mouse Button (RMB, requires beamshift calibration).
The "FastADT" has been designed in 2025 by the author as a functional replacement of the analogous protocol implemented as RATS: an iTEM plugin created by Yaşar Krysiak, Sergi Plana-Ruiz, and Lukáš Palatinus. It is capable of collecting RED, PED, and cRED data with a priori tracking. Compared to other single-crystal frames of Instamatic, it is robust and transferable but may require additional calibrations to run some of the cases.
To start a "FastADT" experiment, select diffraction and tracking settings. Additionally, manually select and "store" the beam settings for taking "image", "tracking" crystal, and collecting "diffraction". These settings will be automatically recalled as needed during the experiment, and can be recalled manually using the "restore" buttons. Additionally, "beam blank" can be controlled using a dedicated button. Once everything is set, click "start" and follow the instructions on the screen (if any).
"Continuous" diffraction mode requires either a fitting `instamatic.calibrate_movie_delays` at target exposure to be complete or config.camera.dead_time to be set. "Manual" tracking algorithm requires `instamatic.calibrate_beamshift` in the current experiment directory, and this calibration will be run automatically with the current diffractions. As all experiments, `config.calibrate` must also include the calibration constant for the current detector distance used in the diffraction mode.
Speed of the stage rotation can be expressed in multiple ways. By default, FEI accepts the stage speed setting of an arbitrary number between 0 and 1. The rotation speed changes linearly with this setting, typically maxing out somewhere around 0.3. Below are the results of calibrating stage speed against this setting. Setting of 0.2 marks rotation of 6 degrees per second and is set as the default upper limit in Instamatic.
The unitless speed setting, rotation speed expressed in degree/second, and rotation pace expressed in second/degree follow and can be easily converted assuming the model shown below. The following calculator has been provided to allow quick and easy conversion outside of the program: