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

 

Create a Synthetic HAADF Image
Function
Synthesises a HAADF image which resembles a perovskite structure viewed down the [001] axis.
Version
version:20211129, v1.2
Author
D. R. G. Mitchell
Acknowledgements
Bumsu Park is thanked for identifying a problem when creating two lattices which use odd value gaussian sizes. When overlaid, one lattice is shifted half a pixel relative to the other. This is an aliasing problem. The solution is to remove the requirement for the gaussiansize variable to be odd and constrain it to be always even.
Comments

When creating scripts for image analysis and filtering, it is useful to have synthetic images with accurately known parameters (such as spot positions) for testing purposes. This script creates such images. It allows two lattices to be created and combined. The sub-lattice (small spots) can be offset relative to the main lattice, to simulate ferroelectric polarisation. The sub-lattice is split about the horizontal centre-line, with any lattice shifts applied in opposite directions about this line. This simulates a ferroelectric domain boundary. There is also a function to add in variable amounts of random noise.

Updated in v1.2 - to resolve an aliasing issue.

System Requirements
Tested on GMS 2.3 but should work with earlier versions.
Known Issues

None

Supported
Yes
Included Files
Source code
Source Code

See attached script