The Python ®† programming language is now widely used in many fields. Its strengths in scientific computing, the large number of available libraries, and the wealth of online information have all contributed to its growing popularity. This is also true in the field of transmission electron microscopy (TEM). Many TEM systems now offer Python ®† libraries for enhanced control. Today, most electron microscopes can be operated via PC and come with various applications like image observation, elemental analysis, and automation functions, in addition to GUI-based operation. As a result, electron microscopes are no longer tools used only by experts but are accessible to a wide range of users.
At the same time, individual users have diverse needs. Some users may wish to customize their equipment to achieve specific purpose, and this demand is growing. It is difficult for vendors to implement all these demands. In this situation, users were interested in customization using Python ®† and expected a Python ®† library that could control electron microscopes to make it realize. In response, microscope manufacturers are developing and providing such libraries. This report introduces several examples of customizing and extending TEM functions using Python ®†.
Figure 1 shows how Python ®† communicates with a TEM system. The Python ®† library used for this purpose is called PyJEM, provided by JEOL for their TEM system. PyJEM includes various commands to control the microscope. To enable this communication, the PC must have both Python ®† and PyJEM installed, along with the TEM_External software. PyJEM interacts with TEM_External, allowing the microscope to be operated from Python ®†.
Fig. 1.
System dialog between PyJEM and TEM system.