Software package including scripts for the data collection and evaluation of phase shifting holography image stacks with Digital Micrograph Scripting and TitanScripting for electron microscopy.
Note: The workflow and the trainingsdata have not been published (yet). If you are interested please contanct me or the corresponding author of the publication directly.
Phase-shifting electron holography is an excellent method to reveal electron wave phase information with very high phase sensitivity over a large range of spatial frequencies. It circumvents the limiting trade-off between fringe spacing and visibility of standard off-axis holography. Previous implementations have been limited by the independent drift of biprism and sample. We demonstrate here an advanced drift correction scheme for the hologram series that allow to obtain reliable phase information at the 1 Å information limit of the used Titan 80-300 kV environmental transmission electron microscope using a single biprism at moderate voltage of 250 V. The obtained phase and amplitude information is validated at a thin Pt sample by use of multislice image simulation with the frozen lattice approximation and shows excellent agreement. The presented method drastically reduces the hardware requirements and thus allows to achieve high resolution in off-axis holography in various instruments including those for in-situ applications. A software implementation for the acquisition, calibration and reconstruction is provided.
Install the latest version Digital Micrograph. Install the FAUX camera libary.
The phase shifting measurement procedure involes a routine to use the GunTilt lens of the Titan to tilt the beam off from the optical axis to create phase shifts in the holograms, that are the heart of this method. In our implementation is a default option using the Digital Micrograph Microscope interface, but with our Microscope (Thrmofisher Titan) this procedure was way too slow and needed approx 1-2 seconds to create one of the beam tilts. Since a phase shifting holo series covers around several tens of images, the specimen driftin the dead time is a serious problem. But maybe the delay is shorter on other instruments. The relevant portion of the script could be replaced with low efford.
Tem scripting interface or the ability to precompile microscope commands as executable files, that then are included in the measurement script.
The acquisition of the phase shifting holo image series requires a calibration of the magnitude and direction of the beam tilt. Both, calibration and the image series recording are implemented in the TiltSeriesUI.s Digital Micrograph script. An phase shifting holo tilt series should at least cover the phaseshifts in the intervall
The functionality of the precompiled functions to manipulate the electron beam can be tested with the Digital Micrograp script getBeamTilt.s. All API-functions to manipulate the electron beam are located in BeamTilt_API.
Acquire
Start: Starts the recording of the image tilt series. Looping over the amplitude and angle ranges given under
Amplitude and Angle.
Stop: Cancels the measurement thread.
Ref: Saves the current image shift position to jump there to take the vacuum reference after the specimen tilt
series.
Wobble: Starts a Wobbler-calibration measurement. Using Amplitude, Angle and Samples
Samples: Defines the number of sample-points within the wobbler amplitude ramp. See details
Angle [deg]
Start: Inital tilt angle. 90 degree corresponds to the tem holder axis in the FEI Titan.
Stop: Final tilt angle.
Stepsize: Used stepsize if ramping the angle. Set to zeroi for fixed angle measurements.
Amplitude [DAC]
Start: Initial tilt amplitude in units to the digital to analog converter.
Stop/Its.: Final tilt magnitude. For typical biprism voltages from 200-300 V [0,40] is a good first wobbbling
guess.
Stepsize: If stepsize=0: using the stop value as number of measurements to be done. If stepsize>=0 use it to
determine the steps between Startand Stop.
Options
Calibrate: User input of constant factors to scale the tilt magnitudes in x- and y directions
respectively. Optional after calibration to rescale the used tilt magnitude.
[✓] Gun: If checked the gun tilt lens is used via TEM scripting compiled executable.
If unchecked the EM Commands are used. Note that the later may have a long delay.
[✓] Pairs: If checked an image is recorded at the zero reference tilt angle after each image in the tilt series. This
feature can be used for π-phase shifting electron holography
[✓] Vacuum reference: If checked a vacuum reference tilt series is acquired parallel at the image shift position
defined by Ref. The same angle and amplitude parameters are used for the vacuum
series. Trades specimen drift vs. biprsim drift compared to sequenctial recording of two
seperate stacks.
Evaluate
Drift: Uses the phase correlation function to roughly calculate the specimen drift of the
frontwindow
image stack.
Measure stack: Measures the hologram phase of the carrier frequency from the FFT of each hologram inside the frontmost stack. The output is an image. In the current version a horizontal line profile about the third line is the phase. Detials are found in the image info tag. Once the result is provided as line profile, that is used as input for the reconstruction.
Correct: Corrects the tilt series image stack by the drift determined by Drift.
Refine: Beta feature that measures the phase of the holograms by non-linear cosine fitting via python.
Not recommended, use Measure stack insted.
Drift x: Linear x-drift interpolation according to Drift.
Drift y: Linear y-drift interpolation according to Drift.
For a given biprism voltage and a certain beam tilt angle the magnitude
If the standard derivation of each image is plotted against the
The subroutine to do a Wobbler-Calibration is found in the Tilt_Calibration folder.
Wobbler-Calibration Input Example (250V biprsim)
Wobbler-Calibration Input Example (250V biprsim):
Acquire:
Samples=4.0
Angle [deg]:
Start=90 # choose fix angle along holder axis
Stop=0 # do not vary the angle during wobbling
Step=0 # do not vary the angle during wobbling
Amplitude [DAC]:
Start=0.0
Stop=25.0
Step=1.0
press Wobble Button
Wobbler Calibration Output Example
Standard derivative of wobbler calibration image intensities for number of samples n=[2,3,4] plotted vs maximum tilt magnitudeThe main tool for the specimen drift correction is the digital micrograph script DriftCorrUI.s.
Its purpose is to create a custom mask in reciprocal space. This custom mask can constist of combinations of spot- and radial masks to focus the drift correction onto the relevant spatial frequencies. After the mask is constructed with the user interface, it can be applied to the image stack and the drift calculated via cross correaltion or phase correlation function. The drift vector is returned in form of an image, that can be applied to stacks.
The specimen drift correction scheme is proposed in the publication and an example workflow is given below. We have decided to not fully automize the drift correction, since the output of each step should be checked carefully. The quality of the drift correction can be very sensitive to the chosen filter conditions. As a first attempt always try to use a Gaussian line Filter for the Fresnel frequencies and a top head centerband aperture. For some data stacks this may enough to reliably find the specimen drift vector. This circumvents the effort necessary do undergo the full drift correction scheme.
Input
Assign: Assigns the frontwindow image stack to the Userinterface.
Hanning: Apllies a realspace hanning window with radius=0.5* image width/height to the stack center.
Aperture
Load: Assigns frontmost image as working aperture.
Save: Saves current working aperture as image.
Radial masks
Top-head: Applies an top-head mask to working aperture. The radius is given in pixel by Radius
B`worth: Applies a Buttherworth to working aperture. The radius is given in pixel by Radius and its order is defined
by an user dialog.
Radius: . Radius in pixel used for Top-head and B`worth
Positive: Adds a positive spot mask at the most intense pixel inside the current ROI. The radius is given via user
dialog.
Negative: Adds a suppresses FFT signal inside the spot mask at the most intense pixel inside the current ROI.
The radius is given via user dialog.
Blur: Adds Gausssian blur to the edge of an exsiting Top-head The blur width is given in pixel as user dialog input.
Undo: Reverts the last action affecting the working apertue.
Holography
Sideband: Removes the most intense bragg peaks inside the sideband. The number of peaks to remove is user input
dialog.
Fresnel: Not fully implemented yet. Should use a gausssian line filter to mask the fresel streak.
Measure
XCF: Use the Cross correlation function (XCF) to calculate the drift for the active reciprocal mask image and the
acitve image cube.
PCF: Use the Phase correlation function (PCF) to calculate the drift for the active reciprocal mask image and the
acitve image cube..
[✓] Pairwise: If checked, the drift vector calculated by XCF or PCF uses the predecessing image of the cube.
If unchecked, the first image of the series is used insted as ankor for all images.
Max X: Maximum drift vector component
Max Y: Maximum drift vector component
Drift Sequence
Load:Loads a drift vector image created with XCF or PCF.
Apply:Applies a drift vector image created with XCF or PCF to the active image cube.
This notation strictly follows the original phase shifting holography reconstruction approach by Ru et al.
Once a phase shifting hologram series of
This equation can be rewritten in matrix form:
Multiplying both sides of the equation by
The equation can be solved effeciently by inverting the
Calculating
The complex inverted matrix is needed as input to solve the above matrix equation by calculating
The background contrast a(x,y), the fringe contrast b(x,y) and the exit-wave phase
Note that the direction of the sign of
After the matrix reconstruction process the fitted parameters
The goodness of fit
TiltSeriesUI.s
Input:
- Phase shifting hologram series as 3D image cube
- 1D image containing the
$\phi_n$ of each hologram
The phase shift
ReconPS_Holo_Matrix.s
ReconPS_Holo_Matrix_with_Fresnel.s
Input:
- 1D image containing the
$\phi_n$ of each hologram
- Two 3x3 pixel images containing the real- and imaginary part of the corresponding inverted matrix
Account for Fresnel modulations
As Lei et al. have shown, in principle the cosine can be replaced by a Taylor series to account for the Fresnel modulation.
The Fourier components are subsequently numbered by
We have implemented the Taylor series reonstruction as digital Micrograph script ReconPS_Holo_Matrix_with_Fresnel.py.
ReconPS_Holo_Image.s
ReconPS_Holo_Image_FresnelDiff.s
Input:
- 1D image containing the
$\phi_n$ of each hologram - Drift corrected 3D image cube containing the phase shifting series
- Two 3x3 pixel images containing the real- and imaginary part of the corresponding inverted matrix
- Two float number
$T_x$ $T_y$ the fringe spacing in pixels in x- and y direction. Note that their sign depends on the choice of the side band maximum to calculate the phase shift. And may have to be adapted. By default (both positive) we assume, that the one that is used is in the upper left quadrant. If it is located in the upper right quadrant, flip the sign of$T_x$ .
- background constrast image a(x,y)
- fringe constrast image b(x,y)
- phase image
$\Phi(x,y)$ - tilt series model prediction
$\hat{I}(n)$ as 3D image cube
Amplitude
Disclaimer
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them. All scripts are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.