Update May 2024: I have been tinkering with various Python-related projects. I may update the PyJEM section of this website occassionally with anything I think may be of interest to PyJEM users.
Update March 2023: Due to budget cuts by the University of Wollongong, my position at the microscopy centre has not been continued. I will not be looking for a full-time position and will probably retire in the next few months. However, I remain open to offers of interesting short-term work, such as consulting, staff training, facility development etc. I will continue to maintain this site, at least for a while, and will be happy to support users with queries or issues relating to my scripts. However, as I no longer have access to microscopes, my ability to support hardware-related issues will be limited.
DigitalMicrograph™ is Gatan's software front-end to their range of cameras and spectrometers for transmission electron microscopy (TEM). DigitalMicrograph™ also interfaces with non-Gatan hardware, such as the Omega filter on JEOL's 2200FS TEM. As such, this software is used by the majority of TEM users in the World. In its own right, DigitalMicrograph™ is a powerful image processing and manipulation program, which can be used to manipulate and process images from a range of sources, not just those derived from TEM. Perhaps the most powerful attribute of DigitalMicrograph™ is also its least well known, namely that it is fully scriptable. This allows users to develop programs (scripts) to do everything from simple image manipulation, through to sophisticated data acquisition systems for controlling microscope hardware. This allows users to fully customise their microscopy environment and to provide niche capabilities which no manufacturer could ever hope to do in a commercial program.
Scripts can be incorporated into DigitalMicrograph™ as new menu items, and thereafter the implementation is effortless and the tools can be used by users without any scripting knowledge.
Visitors to this site may simply wish to download specific tools and implement them without ever understanding the scripting involved. That is absolutely fine - users are welcome to use this software as they see fit. If this software contributes in any significant way to any published works acknowledgements are always welcome, and citations even more so. The author has written a number of journal articles on scripting. Some relate to specific software tools - if you use those, please consider citing the relevant papers. There is also a paper in Ultramicroscopy which discusses the general methods, techniques and benefits of scripting. Please consider citing this article if you have found some of the more general software tools useful.
If users wish to modify any of this code, again they are welcome to do so. The more scripters there are out there, the better. However, if you do redistribute such modified software, please attribute the original bits to the author.
This site is not intended as a repository of software by other authors. These should be directed to the DigitalMicrograph™ Script Database, a large repository of DM scripts by a wide range of authors. Over the years I have contributed a large number of scripts to that site. However, recently I am able to spend more time on scripting and consequently I wish to update, revise and publish new scripts on a regular basis. I also have developed an interest in web publishing. Hence, the genesis of this site.
Please report any broken links or other problems with this site to the Webmaster (in your email program remove the nospam from the address to make it work).
Gatan make available a free version of DigitalMicrograph. The newest version (GMS 3.x) is available in 64bit format only and is compatible with 64bit versions of Windows 7 through 10. The free version of DM can be obtained by requesting a license from Gatan.
Time and tide (and software) wait for no man. DigitalMicrograph has been available in the GMS 3.x version for some time now, and many users have moved on to it. I myself have access to three Gatan-based microscope installations - all of which are running GMS 2, and will likely continue to do so for the foreseeable future. So GMS 2 will remain my development platform of choice. For a one-man-band, testing scripts and fixing bugs is a very time-consuming hobby on just one software platform. Keeping scripts viable for three such platforms (GMS 1-3) is simply not possible. I will therefore cease explicitly testing and supporting scripts in GMS 1 and now test only in 2 and 3.
GMS 3, specifically GMS 3.22 has thrown a few problems my way. There are differences with GMS 2, which have caused several of my scripts to simply stop during an analysis. This is due to untrapped exceptions, whereby bugs in my code got a pass in previous versions, but here they cause the bus to go over the cliff. Another problem is the way in which dialogs are handled in GMS 3 - they are no longer floating document windows. This causes many of my dialog-based scripts to grab whichever window is behind the dialog, rather than the dialog itself. This causes windows to move around in unexpected ways. It is annoying, but usually not serious. If you find any dialog-based scripts which are moving windows which they shouldn't, please bring them to my attention. In general it is only a few lines of code which need changing. My CHT Diffraction Analysis and DiffTools packages have now been updated to work fine with GMS 3. GMS 3 introduces Workspaces and the behaviour of the ImageDocument . . () and some other commands has changed. This may cause some GMS 2 scripts to behave in unexpected ways, due to not being able to find particular images. A new function aimed at dealing with this can be found here. If you find a script that is being a bit squirelly in GMS 3, try having just one Workspace open (which will make GMS 3 appear the same to the script as GMS 2). Also, some functions have changed their behaviour in GMS 3.x, such as the rebin() function.
Bug Reporting: If you encounter bugs in scripts runnning in either GMS 2 or 3, please send me a report with the following information: Computer RAM, Operating System, GMS version, Script Name, A detailed description of the problem - including screen shots of dialog settings where appropriate. If you can reproduce the problem with particular settings/data - please send those to me as a zip file (removing the nospam from the email address). Thanks.
Firefox is used for testing this web site, and so is the web browser recommended.