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

 

Example: Deconvolute Gaussian Peak Shape
Function
A short example script which shows how to deconvolute a Gaussian-shaped peak from a signal using FFT methods.
Version
version:20200428, v1.0
Author
D. R. G. Mitchell
Acknowledgements
Shixin Wang is thanked for the tip on splitting the Gaussian peak prior to carrying out the FFT.
Comments
In this example, a signal profile is produced by scanning a gaussian-shaped probe across a square wave step function. The Gaussian peak is then deconvolved from that signal to restore the step function. FFT methods cannot recreate sharp edges - so minor artefacts are introduced at the steps. This example represents a worst case scenario. In practice most spectral signal will not be square waves.
System Requirements
Should be compatible with all recent versions of DigitalMicrograph.
Known Issues
This type of FFT processing will massively amplify high frequencies (noise). In this example, there is no noise in the signal. However, in real life there will be. Some form of high frequency filtering in the frequency domain (eg Butterworth filtering), may be necessary when using this approach for real world applications.
Supported
Yes
Included Files
Main script file.
Source Code

See attached file