Scripting Resources for DigitalMicrograph™

banner

Dave Mitchell's DigitalMicrograph™ Scripting Website

Home | Scripts | Examples | Functions | Recent Updates | Tutorials | Resources | Publications | Consulting | Projects | Contact & Bio |PyJEM| Search

 

Streak-free FFT
Function
Applies a Butterworth filter prior to computing the FFT or Reduced FFT, to remove streaks in an FFT caused by the image edges.
Version
version:20191021, v1.0
Author
D. R. G. Mitchell
Acknowledgements
-
Comments

The image does not have to be square or a power of 2 in dimension. However, if the image is rectangular or if a rectangular region of interest is present, then the FFT returned will be the largest square area centred on the rectangle. Options to create the FFT or the Reduced FFT are provided. The Butterworth filtering used to damp the effects of the image edges is controllable via zero radius and order parameters. The filter being used can also be returned. Typically, the filter will have the largest radius possible, consistent with damping the edges.

While this type of filtering will remove the effects of the image edges, which cause vertical and horizontal streaks through FFT spots, it will not remove the effects of skips and jogs which also cause this type of streaking. Skips and jogs are STEM scanning innacuracies and more sophisticated processing is required to correct these effects. The filtered FFT is more akin to what would be seen in a diffraction pattern, and so is preferred to an unfiltered FFT. This script replicates the functionality in the Process/Diffractogram menu.

System Requirements
Tested on GMS 2.32, but should be compatible with GMS 3.
Known Issues

This script is designed for producing diffractograms for use in displaying diffraction information. If a filtered FFT is inverted, then the resulting image will contain the shadow of the mask.

Supported
Yes.
Included Files
Source code.
Source Code

See attached script