Find image by ID
Python - Gatan
Example use of FindImage by ID. This script gets the chronologically last image. It works because image IDs are incremented whenever new memory is allocated.
Focal series
DigitalMicrograph - Gatan
Simulate a focal series of theoretical diffractograms.
Get front two images
Python - Gatan
Demonstration of accessing the two frontmost images in GMS.
Having a script wait for a file to appear
DigitalMicrograph - Gatan
Example script which holds its execution until a certain file is found at a given location. Checking is performed on the main thread at given intervals.
Import an image from a text file
DigitalMicrograph - Gatan
Command example script showing how the ImageImportTextData() command is to be used.
In-situ 4D STEM maximum spot mapping
Python - Gatan
Produce a series of colorful maps of crystalline regions from an in-situ 4D STEM dataset open in DigitalMicrograph. This uses a simple algorithm that finds the location and intensity of the maximum pixel in each pattern. The resulting in-situ video of color maps automatically syncs with the original data in DigitalMicrograph. While the results look like orientation maps, the script does not perform proper orientation mapping.
In-situ dataset radial profile Diff or FFT
Python - Gatan
Compute radial-max profiles from an in-situ dataset in DigitalMicrograph. The data can be HRTEM images (from which the FFT will be computed) or diffraction patterns over time. The primary result is a single 2D display of these profiles over time, with time as one dimension and radius as the other. The script also generates an automatically synced in-situ dataset of the 1D radial profiles.