TEMGYM Advanced: Software for electron lens aberrations and parallelised electron ray tracing
간접 관련 필름·전자재료 · (15) 디스플레이 패널재료 (11) 배리어 필름(16) CPI(투명 폴리이미드)
기본 정보
- 저자
- DOI
- 10.1016/j.ultramic.2023.113738
- 저널
- Ultramicroscopy
- 발행년도
- 2023
- 발행기관
- Elsevier BV
- 피인용수
- 4
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1016/j.ultramic.2023.113738
- 토픽
- Advancements in Photolithography Techniques
- OpenAlex ID
- W4362604557
평가 내용
- 관련도
- 간접 관련
- 사업분야
- 필름·전자재료 · (15) 디스플레이 패널재료
- 부 분야
- (11) 배리어 필름, (16) CPI(투명 폴리이미드)
- R&D 측면
- 분석·모델링
- 확신도
- 0.70
- 근거 용어
- electron microscopy, ray tracing, aberration, digital twin, characterisation
- 판단 근거
- 본 논문은 전자현미경(Electron Microscopy)의 광학적 수차와 전자 빔의 경로를 시뮬레이션하는 소프트웨어 개발에 관한 연구입니다. 이는 코오롱인더스트리의 직접적인 제품 연구는 아니나, 필름 및 디스플레이 소재(15)의 미세 구조 분석이나 나노 단위의 물성 평가를 위한 분석 기법 및 디지털 트윈 모델링 측면에서 간접적인 활용 가치가 있습니다.
- R&D 활용 포인트
- 디스플레이용 박막(encapsulation)이나 투명 폴리이미드(CPI) 등 나노 구조 분석이 필수적인 고기능성 필름의 품질 관리 및 미세 결함 분석을 위한 시뮬레이션/분석 모델링 기술로 응용 가능합니다.
- 평가 입력
- 본문 70,902자 중 30,032자 발췌
초록
본문 70,902자
본문 펼치기
섹션 본문 63문단 · 38,138자
(제목 없음)
1Characterisation of the electron beams trajectory in an electron microscope is possible in a few select commercial software packages, but these tools and their source code are not available in a free and accessible manner.This paper introduces the free and open-source software TEMGYM Advanced, which implements ray tracing methods that calculate the path of electrons through a magnetic or electrostatic lens and allow evaluation of the first-order properties and third-order geometric aberrations.Validation of the aberration coefficient calculations is performed by implementing two independent methodsthe aberration integral and differential algebra (DA) methods and by comparing the results of each.This paper also demonstrates parallelised electron ray tracing through a series of magnetic components, which enables near real-time generation of a physically accurate beamspot including aberrations and brings closer the realisation of a digital twin of an electron microscope.TEMGYM Advanced represents a valuable resource for the electron microscopy community, providing an accessible and open source means of characterising electron lenses.This software utilises the Python programming language to complement the growing ecosystem of free and open-source software within the electron microscopy community, and to facilitate the application of machine learning to an electron microscope digital twin for instrument automation.The software is available under GNU Public License number Three (GPL 3).
Introduction
2Over the last decade, an ecosystem of open-source software for electron microscopy has evolved through packages such as LiberTEM, PyXem, HyperSpy & AtomAI [1][2][3][4], and these have enabled users to automate data analysis, share results more easily online via Google Colab or Jupyter notebooks [5] and facilitate reproducibility and verification of results.There has also been a growing adherence to the FAIR principles [6] for data, requiring scientists to make their data findable, accessible, interoperable, and reproducible.However, an area of electron microscopy which has not yet benefited from this approach is that of electron optics, which includes ray tracing techniques, calculation of aberration coefficients, and generation of spot diagrams.Commercial software such as MEBS & EOD [7,8] are available, but often at cost for researchers, which means they are not ubiquitous within the electron microscopy community.A growing interest within the electron microscopy community to design and modify electron microscope components [9,10] along with funding bodies beginning to require further openness and interoperability amongst electron microscope designs [11], an open-source package capable of producing electron optics calculations would help facilitate cooperation, accelerate discovery and make repetition of experimental results more accessible.This paper introduces TEMGYM Advanced, a Python-based electron optics software for calculating ray tracing paths through electrostatic and electromagnetic lenses for charged particles.Our previous iteration of this software, TEMGYM Basic [12] (under review) is a 3D interactive environment for teaching electron microscope alignments which uses a linear description of the beam path through a series of electron optical components.
3In contrast, TEMGYM Advanced correctly calculates the trajectory of electrons through a lens, deflector, or quadrupole by solving the trajectory equations of motion.The development of the software has been aimed primarily at electron optics, although minor modifications would enable it to include other charged particles.Our choice of the Python programming language to develop this software is multifaceted, making use of numerous packages [13][14][15][16] to develop the software efficiently, as well as in the future allowing our code to interface smoothly with the growing community of Python-based electron microscopy software and machine learning packages.The TEMGYM Advanced software enables users to perform basic electron optical characterisation routines such as finding the first-order properties (e.g.magnification and focal length) of an axially symmetric lens or finding the aberration coefficients of an analytical lens potential using the aberration integral or the differential algebra method.The differential algebra (DA) method is an alternative method to calculating aberration coefficients and negates the need to derive and calculate aberration integrals by formulating the solution to the electron equations of motion as a Taylor expansion.As far as the authors are aware, the DA method in electron microscopy was only previously available through the academically licensed software COSY INFINITY or the commercially available software MEBS.A further unique aspect of TEMGYM Advanced which separates it from commercial software is the ability to perform ray tracing calculations in parallel and form a spot on the detector in real time, which is discussed further in the section Parallelised Electron Ray Tracing.
Analytical electrostatic and magnetic field models with SymPy
4Calculating the trajectory of an electron or charged particle through a lens first requires a description of the field near the optical axis.The general expression of a multipole field expansion is given by: [17,18]
5Where U m is the axial field potential harmonic, j is the number of components to calculate in the series, and m represents the harmonic series to calculate.For m = 0, the series calculates the expansion for a round electron optical lens.For m = 1, the series calculates the expansion for a dipole harmonic, m = 2 is the first quadrupole harmonic etc.The κ = i term in the summation determines whether to calculate the expansion for the coordinates x and y terms which start at κ = i = 1, or the z coordinate terms, which start at κ = i = 0. Provided the shape of the field produced by the lens along the z-axis is known, expanding equation (1) to j th order generates a function that describes the field beyond the paraxial regime.By paraxial regime, we mean the case where electrons travel close to the centre of the lens with a shallow slope.
6Equation ( 1) is implemented in the software via the symbolic computing toolbox SymPy [14], which allows one to compute derivatives & integrals analytically, and its convenient functionality provides a seamless way to expand equation (1) for any required potential.SymPy symbolically computes derivatives for even the most complex axial function representations, enabling a quick and convenient functional representation of the 3D magnetic & electric field surrounding any round lens.
7Expansion of equation ( 1) requires choosing the order of the expansion, m, and the number of terms to calculate j.Calculation of a single component (for example, x) of the series expansion of an axially symmetric electrostatic lens (m = 0) with two terms, (j = 1) using equation ( 1) is performed as follows:
8To calculate the x component of the expansion for an axially symmetric magnetic field with two terms, B(z), the potential φ(z) must be replaced by the magnetic scalar potential ω(z), and the axial potential U(z) must be replaced by the axial magnetic potential Ω(z), where the quantities B(z) and Ω(z) are connected by:
9where μ is the permeability.thus:
10A similar process can be followed to obtain the y and z components of an axially symmetric field distribution.Although usually for an axially symmetric field distribution, cylindrical coordinates are more appropriate, in this work we opt to use the cartesian representation because it enables us to more easily compare the results of our aberration calculations to previous work which also uses the cartesian representation [19,20], and also because it more readily enables us to calculate the trajectory of the electron in 3D as shown in the section parallelised electron ray tracing.Once an axial field function is specified for a given lens configuration, it is possible to reuse this expansion for numerous calculations.For example, this paper shows how to use equation (1) with two terms to trace thousands of rays in parallel through a series of magnetic components and obtain an image of the electron spot that contains third-order geometric aberrations, or use the expansion to calculate the aberration coefficients for a round magnetic or electrostatic lens using the aberration integral or the differential algebra method.
11The analytical axial field functions analysed in this paper are Glaser's Bell Shaped Field and Schiske's Electrostatic Lens [21,22]
12a and k in equation ( 5) and equation ( 6) are variables which affect the shape of the axial distribution, and ϕ 0 is the acceleration voltage of the electron.
13Although outside of the scope of this paper, it is possible to generate the expanded series for a dipole, quadrupole & octupole and so on, provided one knows the axial harmonic functions.However, in general, this is not a straightforward problem to solve, and the author is only aware of one example in the literature displaying how to calculate the axial harmonics of a dipole system [23].
Linearised ordinary differential equation solutions of electric and magnetic fields
14The series expansion of a round electron optical lens field, as shown by equation (1), enables the calculation of higher-order aberrations, but only the axial field function is needed to calculate the first-order properties of a lens.Combining the axial field function with the equations of motion for an electron in a magnetic or electrostatic field creates a linearised ordinary differential equation (ODE) (equation (7)) which, when solved, will calculate the first-order properties (focal length, magnification, principal image plane) of a lens [17,18] and provide a general solution for any ray path with a different initial position or slope in the plane of the object.The following function represents the non-relativistic linearised ODE for magnetic & electrostatic lenses: When solving these equations to obtain a general solution, two rays are traced with specific initial conditions through the electrostatic or magnetic field, denoted g and h.The conventional method noted in the literature proceeds as follows [18,[24][25][26]: From a starting object position denoted z 0 , trace a ray denoted g that starts at a radial position of 1 m, with a slope of 0, and when traced through the lens, will determine the focal length with respect to the centre of the lens.Calculation of a second ray denoted h, that begins with a slope of 1, and a position of 0 m at the object plane, traced through the lens determines the gaussian image plane.When the ray g is traced further to the gaussian image plane, its height determines the magnification of the image (see Fig. 1 for clarification).These two-ray solutions also form any other solution beginning with a different set of initial conditions, which has the practical use of enabling a full first-order description of the beam path with any set of initial conditions for a single starting object position.The solution rays g & h are also necessary when one wishes to calculate the aberration coefficients of an electron optical component, which is discussed further in Calculating aberrations of round lenses in Python.
Ordinary differential equation Solvers
15The most common method chosen to solve the electron equations of motion through an electron optical lens is usually an adaptive step size Runge Kutta method [20,27].The method chosen in this paper is the RK5(4) method with Dormand Prince coefficients (RKDP54) [28].This method is an adaptive step size method which uses a fifth-order step to advance the calculation, and a fourth-order step to estimate the error.If the error is below a user-defined tolerance, the step size h of the algorithm is reduced until the error is below tolerance.The RKDP54 method contains certain drawbacks, as it requires seven force evaluations per step, which are the most expensive calculation when solving the equations of motion, and the method is not symplectic, meaning the kinetic energy of the system is not conserved.Thus, even though the error in the calculation seems low, an unphysical particle trajectory can result when solving the equations of motion.A symplectic integrator is of great importance in the field of charged particle tracing of nuclear fusion reactor designs, which requires tracing particles through magnetic fields for an extended time in a periodic orbit.Fortunately, the distances and time over which the electrons are propagated through electrostatic and magnetic fields (and the accuracy required) within the electron microscope are low enough such that kinetic energy drift does not become an issue.The linearised ODE (equation ( 7)) & the differential algebra method (see Lens aberration analysis via the Differential Algebra Method) presented solve the electron equations of motion via the RKDP54 method, which allow the calculation to be sped up significantly due to its adaptive step size feature.
16However, when parallelising the ray tracing algorithm for real-time beam visualisation, the code uses the symplectic first-order Euler Cromer method, which only requires one force evaluation per propagation step.As a result, the Euler-Cromer method performs calculations significantly faster per step than the RKDP54 method, with the trade-off that the step size is non-adaptive and the global error rate is proportional to the step size O(h).Furthermore, because the Euler-Cromer method is far easier to implement, the parallelised version of this software opts for the Euler-Cromer method when implementing the parallelised algorithm.
17Fig. 1 shows the ray paths obtained when solving equation ( 7) with the analytical field equations of ( 5) and ( 6) for a magnetic and electrostatic lens, and the initial conditions of g = 1, g
18to obtain the first order properties of each lens.The inset in each figure displays the principal image plane, where the ray appears to be deflected from if the lens was treated as a thin lens that performs a single deflection.
19Table 1 shows the first-order properties of Glaser's Bell-shaped field and Schiske's Electrostatic field that are obtained when solving the linearised ODE via the RKDP54 method, and compares these results to the analytical solutions of the first-order properties presented in [19,29].Good agreement between both methods is found, which allows us to verify that the non-symplectic nature of the RKDP54 method does not significantly impact the path of the electron ray and the first-order properties.Results in Table 1 are presented with 15 significant figures.
Calculating aberrations of round lenses in Python
20In a few cases, a straightforward analytic solution to the aberration coefficients of an analytical axial lens function can be found in the literature [29,30].However, no such method usually exists, and microscopists must resort to other computational methods such as the aberration integral or differential algebra method [18,31].The differential algebra method formulates the solution to the general electron equations of motion as a Taylor expansion, whose polynomial coefficients represent the aberration coefficients, and this method is available in MEBS & Cosy Infinity [7,32].Another approach to obtaining aberration coefficients should also be mentioned which is implemented in the software EOD [8], which utilises a polynomial fitting method [33], although this work does not implement this method.
21This software implements both the aberration integral and differential algebra methods into TEMGYM Advanced and recreates aberration calculations found in the literature for the analytical potentials presented by M.Cheng et al. and Z.Liu [20,27].Note that the methods presented here only calculate the real aberration coefficients.In the case of asymptotic aberration coefficients, which occur when either or both the object and image are located inside the lens field, then a different set of aberration integrals must be solved [18].The differential algebra method implemented can only calculate the real aberration coefficients.
Aberration Polynomial
22The polynomial form of the third-order geometric aberration coefficients of an electron optical system can be obtained via a variational method described by Hawkes [34] and can be written as follows:
23with
24where x 0 and x ′ o are the position and slope of the ray at the object plane, M is the magnification of the image, x
25(3) i is the third-order deviation of the ray from the ideal paraxial ray at the image plane, and the matrix A is composed of the individual aberration coefficients where B = Spherical Aberration, C = Isotropic Astigmatism, D = Field Curvature, E = Isotropic Distortion, F = Isotropic Coma, c = Anisotropic Astigmatism, e = anisotropic astigmatism, f = anisotropic coma.B, F, C, D and E are known as the five "Seidel Aberrations" [35], and a graphical representation of their meaning can be found here by J. Savard [36].c, f and e are the anisotropic aberrations coefficients, and appear because of the rotation applied to the electron as it passes through a magnetic field.The
Table 1
26Comparison of first-order properties calculated via analytical solutions against solving the linearised equations of motion.values of each of the aberration coefficients for a particular starting position of the object on the z-axis can be obtained by solving the appropriate aberration integral.See textbooks from P.Hawkes, J.Orloff and M.Szilagyi [17,18,37] also for a more in depth overview.Numerous formulations of aberration integrals for round magnetic & electrostatic lenses can be found in the literature, and this software implements the aberration integrals printed by P. Hawkes [18] for magnetic lenses and those by Z. Liu [38] for electrostatic lenses.See the supplementary section for the specific equations implemented in this software.
27Expanding equation ( 6) creates a polynomial expression which describes the third-order geometric aberrations:
28The software in TEMGYM Advanced combines the linearised ODE solutions, which return the principal rays g and h, with the symbolic package SymPy that calculates derivatives of the analytic potential or field to obtain the aberration integral.The software then utilises Simpson's rule implemented in the package SciPy [39] to solve the aberration integral numerically.It is important to note also that only the anisotropic coefficients c, f & e appear with a non-zero value for a magnetic lens.
Lens aberration analysis via the Differential Algebra method
29The differential algebra method was introduced to electron optics by M.Berz in the particle accelerator physics community in 1990 [40] as a technique to calculate the aberrations of electron optical systems to machine precision.This implementation can be found in a program entitled "CosyInfinity" [32].Eric Munro subsequently introduced the differential algebra method into the electron beam design software MEBS [7] and extended the method to calculate the aberration coefficients of electron mirrors [41].Radlicka has made further use of the DA method to analyse the parasitic aberrations of a hexapole corrector [42].
30As far as the authors are aware, our software TEMGYM Advanced represents the first time that the DA method for electron/ion optics has been used in an open-source project and made freely accessible.This is made possible by the freely accessible python wrapper for the C++ DA library, DaceyPy [15].
31Differential algebra (DA), also known as truncated power series algebra (TPSA), is a method that can generate Taylor series expansions of an output expression as a function of its input.The underlying mathematical principles of differential algebra called "Dual Numbers" were first introduced by William Clifford [43], which enables the algebraic calculation of derivates and avoids the pitfalls of the finite difference method.Dual numbers are the mathematical backbone of automatic differentiation, enabling backpropagation at scale in many machine-learning packages such as JAX [44] & PyTorch [45].DA adopts the dual number system such that any function of n variables can be expanded into its Taylor series.Expanding a function as a Taylor series via the DA method has an interesting application in the realm of aberration analysis in electron microscopy, as when the technique of DA is used to solve the ODE of a particle transmitting through a lens, it readily obtains the final coordinates of the particle as a Taylor expansion of the initial conditions, whose coefficients represent the aberration coefficients of the lens.
32When computing a Taylor expansion, the number of coefficients σ associated with each variable v as the order of the expansion n increases is as follows -
33To describe a linear solution (n = 1) of an optical system via a Taylor expansion with four variables (x, y, x ′ , y ′ , v = 4), the number of Taylor coefficients, σ is equal to 5 for each variable.In the case of third-order geometric aberration coefficients, n = 3, and the number of total coefficients per variable (and thus the number of derivatives) increases to 35 according to (10), hence the importance of automatic differentiation & dual numbers in the DA method, which enables rapid and accurate calculation of functions that contain multiple higher order derivatives.The relationship between the initial and final coordinate of the electron with Taylor series coefficients takes the following form:
34Expanding the terms of this series with n = 3 generates a polynomial whose coefficients are equal to the aberration coefficients obtained by solving the appropriate aberration integral.
35For example, A 0300 and A 0102 in (12) are equivalent to B in (9).Coefficients which do not appear in (9) will have a value of zero in (12).
36This work employs the Python package DaceyPy [15], a wrapper for the C++ differential algebra library "DACE" [46] that enables us to perform differential algebra in Python.
37This software uses the trajectory equations of motion in a rotational coordinate system to perform the DA computation and obtain the aberration coefficients, and are given by: [47] x (3)
38D. Landers et al.
39with
40where θ is the rotation angle of the rotating coordinate frame relative to the fixed frame, B(z) is the magnetic axial field distribution, ϕ(z) is the electrostatic axial potential distribution equivalent to the following, and again, ϕ 0 is the initial acceleration voltage of the electron, and primes denote derivatives w.r.t.z.
41In the case of an electrostatic lens, the rotational coordinate system is equivalent to the fixed coordinate system, as the electron does not rotate about the axis.When calculating aberrations, the rotational coordinate system is only relevant in the case of solving the electron trajectory in a magnetic lens, as it allows direct interpretation of the results without further calculation.If the object's location is inside the field of a magnetic lens, then an effect called Object Magnetic Immersion (OMI) [48] further modifies the aberration coefficient values.To account for the OMI effect, one must solve the electron trajectory in a fixed coordinate system and then transfer it to the rotational coordinate system at the end, which calculates the aberration coefficients with OMI included.TEMGYM Advanced has not included this step, but see Z. Liu [20] for more detail.
42The main advantage of the differential algebra method is that it avoids the need to formulate and calculate a series of aberration integrals for an electron optical system to find the aberration coefficients.In the case of electrostatic & magnetic lenses, the aberration integrals are straightforward to formulate and solve up to third order, hence their use as verification of aberration coefficients calculated in our TEMGYM Advanced implementation.However, for more exotic systems involving multiple components and for higher order aberrations, this procedure becomes increasingly complicated [18].
43The DA method is also comparatively simple to compute as only a single ray needs to be traced through a system from the object plane to the image plane to obtain the aberration coefficients to any desired order.In previously published works results have been described up to the fifth order [47].
44The disadvantages are that the DA method requires an analytical representation of the electric or magnetic field on the optical axis.Requiring an analytical representation is a disadvantage because the finite element method calculates the field of practical electron optical lens designs (i.e.CAD models of a lens), which only returns a discrete set of values that describe the field along the optical axis.Therefore, one must either employ a suitable interpolation routine [49] or a fitting measure of the axial field [50,51] to enable the analytical determination of field values and their derivatives.
45A Python-specific disadvantage is that the DA package DaceyPy is incompatible with the standard ODE solvers available in other popular python packages, such as SciPy's odeint.One must implement an ODE solver in pure Python to utilise this software, which will almost always be slower than the highly optimised routines implemented in languages such as Fortran.
46Our programme TEMGYM Advanced is tested via two analytical axial fields for electrostatic & magnetic lenses, attempting to repeat results from M.Cheng et al. [27] and Z.Liu et al. [20], where the code in this work also calculates the gaussian image plane for each of these lenses via the linearised ODE solution (7), enabling us to know with certainty where to trace the ray to obtain the aberration coefficients at the object plane.
47Reproducing some of the results found in the literature was challenging, with the necessary details required for a faithful reproduction of the work either missing or implied.For example, in the case of Z. Liu et al. [20], the gaussian image plane's location was omitted; to recreate their results, a user must know this value exactly.The method to calculate it is detailed by P. Hawkes [29], which requires solving an elliptic integral and the details of this calculation can be found on the GitHub repository associated with this publication [52].
48Table 2 & Table 3 shows the results of our software which has repeated calculations of the aberration coefficients of Glaser's Bell-Shaped magnetic field and Schiske's Electrostatic field using the differential algebra method and the aberration integral method, with results presented to 15 significant figures.Recreating the results of previous publications to high precision to validate our implementation, and required utilisation of the RKDP54 method with an adaptive stepsize.The RKDP54 method's adaptive step size feature significantly reduces the time required to calculate the electron path through Glaser's bell-shaped field, where the object plane location is at z 0 ∼ 0.034 m,
Table 2
49Comparison of aberration coefficients calculated via the aberration integral method, and calculated via the differential algebra method for Glaser's bellshaped field.and the gaussian image plane location is at z g ∼ 34.0 m.The distance that the code must trace the ray is of the order of 3 × 10 1 m, yet to achieve the required precision, a step size of ~ 1 × 10 − 6 m must be used when the electron is in the vicinity of the central field.The calculation will run significantly longer if it utilises a fixed step size because the lens field is located within a small window around 0 m.The higher-order adaptive step size of the RKDP54 method will complete the calculation with the appropriate step size when the field values are large, and as the ray exits the field, the step size will increase, enabling the completion of the calculation in a matter of seconds.It is important to note that the software in its current form can only calculate aberration coefficients of non-relativistic electrons.In future versions, we plan to include this ability in our ray-tracing routines.In the case of magnetic fields, this is trivial, as the kinetic energy of the electron in constant.In the case of electrostatic fields, this becomes slightly more involved, as the gamma factor will change as the electron moves through the electrostatic lens and this must be accounted for correctly.
Parallelised Electron Ray Tracing
50TEMGYM Advanced utilises the high-performance python compilation package numba [53] to accelerate the time to solve the electron equations of motion through a series of electrostatic or magnetic fields and increases the number of rays that can be calculated simultaneously via parallelisation.Parallelisation utilises multiple threads on a CPU or GPU to perform many calculations simultaneously.The GitHub repository [52] associated with this work demonstrates the potential of this feature by presenting an example Jupyter notebook and two interactive models using the visualisation package PyQTGraph [54].
51The Jupyter notebook demonstrates the capabilities of running parallelised code on a modern workstation CPU or GPU and gives users who wish to explore further a minimal working example to trace electron rays in parallel for their problem.Fig. 2 shows an example of tracing many rays in parallel through a single lens.Our hardware can trace 1024 rays through 0.02 m with 20000 steps (stepsize = 1 × 10 − 5 ) in a time of ∼ 84.8 ms ± 4.83 ms.
52Parallelised ray tracing code such as this also enables the creation of basic interactive models which demonstrate some of the basic alignments of a TEM in a physically accurate manner.The first interactive model designed in PyQTGraph mimics the behaviour of a double deflection system and a magnetic lens, recreated via two saddle coils and a magnetic lens model via Glaser's bell-shaped field (Fig. 3).
53Although in a TEM, the electron's velocity is usually so high that a single deflector can model a deflection in the centre of the component via the high energy approximation [55], this example illustrates the modelling of multiple magnetic components in succession using TEM-GYM Advanced.Magnetic deflection systems can be modelled in many ways.For example, akin to a rotationally symmetric lens, our software can use equation ( 1) to model the field of a deflector dipole system everywhere in 3D space if the axial fields and their harmonics along the z-axis are known.Although Lencova has shown how to calculate the harmonic fields of a saddle and deflector coil [23], and these results could interface with the SymPy expression to expand equation (1), this code has opted instead to use an alternative representation.
54The alternative method chosen recreates the shape of a saddle coil via a series of conducting wires and solves the Biot-Savart numerically using the open-source package bfieldtools [16], to obtain a 3D array of the magnetic field value surrounding the saddle coil.A linear interpolation routine then finds the field values at the required location to update the electrons' velocity and position.Once a ray has exited the field of a component and is in field-free space, it is trivial to propagate the distance to the next component in a straight line, thus saving computational cost to transport the electron between components.The arrangement of components in this model mimics a deflector lens system.The GitHub repository [52] contains an interactive model of a double-deflector lens system that demonstrates this software's real-time calculation capabilities.
55The next interactive model recreates the astigmatism correction alignment of two quadrupole magnets and a magnetic lens.Akin to a dipole, the software models a quadrupole via a series of conducting wires.A quadrupole field focuses rays more strongly on one axis, enabling correction of the astigmatism aberration in a magnetic lens that suffers from astigmatism.To create a toy model of astigmatism via Glaser's bell-shaped lens, the response of the field includes an angular component, which results in a different focal length on each axis, recreating an elliptical beam spot.Users can adjust the strength of each quadrupole to correct for the astigmatic Glaser's bell-shaped lens.This interactive demo calculates 2048 electron rays in parallel through two deflectors and a lens and includes a coarse and fine adjustment of the deflector ratio that enables the user to find the beam tilt/beam shift alignment in this example.The beam spot window displays the final location of all 2048 ray paths, but note that in the 3D window, the software only displays a subset of ray paths (512 electron rays) to keep the calculation fast.Further improvements to the software could enable it to display more electron ray paths.
56Although these models are simplified representations, they demonstrate how to apply parallelisation with a modern CPU or GPU to electron microscopy.Typically, commercial microscope designs are unavailable to users; however, users can easily implement an axial field function and interface it with our software or use designs from an opensource microscope, such as the NanoMi project [56], that could pair with this code.Access to the designs of an electron microscope would more easily enable the creation of a complete digital twin of a microscope via our software.A digital twin of a TEM that can accurately calculate the electron beam path and generate a realistic beam spot in near real-time has the potential for many exciting applications in the future.For example, it could enable exploration of automated control of the base alignment steps via machine learning, akin to how many researchers are using digital twin models of many complicated systems such as Tokamak reactors to achieve state-of-the-art automated control in complicated environments where classic control methods struggle to perform [57][58][59][60].A digital twin simulation also has value as an interactive teaching tool, helping to train the next generation of microscopists by providing them with a behind-the-scenes view of how an electron microscope behaves.Furthermore, the methods presented in this paper can be used to calculate the first order properties of real electron optical lenses, which can then be used to create a first-order microscope model via the code presented in TEMGYMBasic [12].
Conclusion
57A suite of open-source tools that model and characterise analytic fields of electron microscope lenses has been presented, which enables the performance analysis of lens designs and the visualisation of a beam spot in real time.The software demonstrates how users can use the expansion of an electron lens potential/field with methods to solve the electron equations of motion to calculate the first-order lens properties or third geometric aberration coefficients.Two methods have been implemented to calculate aberration coefficients via the DA and the aberration integral method, enabling us to verify each algorithm's results.The software has also reproduced the aberration coefficient results of Glaser's Bell-Shaped Field and Schiske's Electrostatic lens from previously published results.Furthermore, this paper presents a method to achieve parallelised ray tracing of an electron beam through a series of electron optical components, generating an electron beam spot with third-order aberrations in a model electron microscope in near real-time.These models help to move us closer towards a realisation of a digital twin of the electron microscope while doing so with an open-source ethos that enables reproducible and verifiable results.
58TEMGYM Advanced demonstrates how the rich ecosystem of packages available in Python enable rapid prototyping and development.For example, the packages available in Python enable symbolic equation manipulation via SymPy [14], hardware acceleration of functions that parallelise and speed up the code via Numba [53], calculation of magnetic fields surrounding a wire via bfieldtools [16], fast calculation of Taylor expansions via DaceyPy [15], and development of a basic GUI via PyQTGraph [54].In the current iteration of this software, we have focused on applying our methods to the most basic of microscope components operating in TEM mode, and there is a rich number of ways to improve and expand upon the code presented in this paper.The Fig. 3. Screenshot of interactive TEM models that perform real-time ray tracing in parallel through a series of components.Top -Double deflector system and lens, with the beam spot and GUI displayed on the right-hand side and the 3D model on the left.Bottom -Astigmatism correction system with two quadrupoles and a lens.The beam spot and GUI are displayed on the right-hand side, and the 3D model is on the left.software could also easily be adapted to calculate aberrations and electron paths through a microscope operating in STEM mode.TEMGYM Advanced could also calculate the aberration coefficients of practical lens designs whose field was calculated via FEM methods and enable the calculation of aberration coefficients for relativistic electrons, and future work will focus on completing this goal.It is also possible to calculate fifth-order geometric and chromatic aberration coefficients with relatively few changes.With more effort, the software will be able to model more exotic microscope components such as Wien filters, electron mirrors, aberration correctors and an electron gun, and we plan to also include these features in future versions of the software.
4ϕ 0 y = 0 ( 7 )
59Where x & y are electron coordinates as a function of z.Primes represent a derivative w.r.t z, i.e. the slope of a ray.ϕ(z) and B(z) are axial potential and field functions of a lens, respectively.ϕ 0 is again the acceleration voltage of the electron.η is given by ̅̅̅̅̅ |e| 2m √ .e ∼ − 1.60217663 × 10 − 19 C, and m ∼ 9.1093837 × 10 − 31 kg.
Fig. 1 .
60Fig. 1.Linearised ODE solutions to Schiske's Electrostatic Lens & Glaser's Bell Shaped Field.Shown are the rays g (blue) and h (red) and how the object (black up arrow) is imaged (black down arrow) by the lens.The inset shows the principal image plane (where the ray appears to come from) and its location behind the lens.
Fig. 2 .
61Fig. 2. 1024 electron rays calculated in parallel over 0.02 m and a step size of 10 μm.Inset shows the effect of aberrations on the beam when using multiple terms in Laplace's Expansion while solving the equation of motion.
Table 3
62Comparison of aberration coefficients calculated via the aberration integral method, and calculated via the differential algebra method for Schiske's electrostatic field.
63D.Landers et al.
참고문헌 49건
- Motion of Charged Particles in Electric and Magnetic Fields Springer eBooks · Springer Nature · 1988 10.1007/978-1-4613-0923-9_2
- Magnetic Electron Lenses Topics in current physics · Springer Nature · 1982 10.1007/978-3-642-81516-4
- Introduction to Conventional Transmission Electron Microscopy Cambridge University Press eBooks · Cambridge University Press · 2003 10.1017/cbo9780511615092
- Handbook of Charged Particle Optics CRC Press eBooks · Informa · 2010 10.1201/9781420045550
- Lie Algebraic Theory of Charged-Particle Optics and Electron Microscopes Advances in electronics and electron physics · Elsevier BV · 1986 10.1016/s0065-2539(08)60329-7
- Numerical simulation methods for electron and ion optics Nuclear Instruments and Methods in Physics Research Section A Accelerators Spectrometers Detectors and Associated Equipment · Elsevier BV · 2010 10.1016/j.nima.2010.11.181
- Study on differential algebraic chromatic aberration method for Glaser's bell-shaped magnetic lenses Optik · Elsevier BV · 2001 10.1078/0030-4026-00075
- Computational aspects of optics design and simulation: COSY INFINITY Nuclear Instruments and Methods in Physics Research Section A Accelerators Spectrometers Detectors and Associated Equipment · Elsevier BV · 1990 10.1016/0168-9002(90)90649-q
- Strenge Berechnung magnetischer Linsen der FeldformH=H 01+(z/a)2 The European Physical Journal A · Springer Science+Business Media · 1941 10.1007/bf01676330
- COSY INFINITY Version 9 Nuclear Instruments and Methods in Physics Research Section A Accelerators Spectrometers Detectors and Associated Equipment · Elsevier BV · 2005 10.1016/j.nima.2005.11.109
- Introduction to Conventional Transmission Electron Microscopy Materials Characterization · Elsevier BV · 2003 10.1016/j.matchar.2003.09.008
- Analytical and numerical computation of multipole components of magnetic deflectors Review of Scientific Instruments · American Institute of Physics · 1997 10.1063/1.1148404
- An Electrostatic Single Lens permitting Rigorous Calculation Nature · Nature Portfolio · 1953 10.1038/171443a0
- The relation between the spherical aberration and distortion coefficients of electron probe-forming and projector lenses Journal of Physics D Applied Physics · Institute of Physics · 1968 10.1088/0022-3727/1/11/321
- Differential algebraic method for aberration analysis of typical electrostatic lenses Ultramicroscopy · Elsevier BV · 2005 10.1016/j.ultramic.2005.07.005
- Differential algebraic method for computing the high order aberrations of practical electron lenses Optik · Elsevier BV · 2006 10.1016/j.ijleo.2006.01.016
- Preliminary Sketch of Biquaternions Proceedings of the London Mathematical Society · Wiley · 1871 10.1112/plms/s1-4.1.381
- Differential algebraic description for third- and fifth-order aberrations of electromagnetic lenses Nuclear Instruments and Methods in Physics Research Section A Accelerators Spectrometers Detectors and Associated Equipment · Elsevier BV · 2003 10.1016/j.nima.2003.11.132
- Study on differential algebraic aberration method for electrostatic electron lenses Optik · Elsevier BV · 2001 10.1078/0030-4026-00045
- Modern map methods for charged particle optics Nuclear Instruments and Methods in Physics Research Section A Accelerators Spectrometers Detectors and Associated Equipment · Elsevier BV · 1995 10.1016/0168-9002(95)00361-4
- Aberration analysis of electron mirrors by a differential algebraic method Optik · Elsevier BV · 2006 10.1016/j.ijleo.2006.06.013
- A new program for the design of electron microscopes Physics Procedia · Elsevier BV · 2008 10.1016/j.phpro.2008.07.111
- A family of embedded Runge-Kutta formulae Journal of Computational and Applied Mathematics · Elsevier BV · 1980 10.1016/0771-050x(80)90013-3
- The FAIR Guiding Principles for scientific data management and stewardship Scientific Data · Nature Portfolio · 2016 10.1038/sdata.2016.18
- SymPy: symbolic computing in Python PeerJ Computer Science · PeerJ, Inc. · 2017 10.7717/peerj-cs.103
- Complements of Geometrical Light Optics Advances in imaging and electron physics · Academic Press · 2016 10.1016/bs.aiep.2016.02.001
- Correction of parasitic aberrations of hexapole corrector using differential algebra method Ultramicroscopy · Elsevier BV · 2019 10.1016/j.ultramic.2019.05.006
- Grandmaster level in StarCraft II using multi-agent reinforcement learning Nature · Nature Portfolio · 2019 10.1038/s41586-019-1724-z
- SciPy 1.0: fundamental algorithms for scientific computing in Python Nature Methods · Nature Portfolio · 2020 10.1038/s41592-019-0686-2
- Magnetic-field modeling with surface currents. Part I. Physical and computational principles of bfieldtools Journal of Applied Physics · American Institute of Physics · 2020 10.1063/5.0016090
- Array programming with NumPy Nature · Nature Portfolio · 2020 10.1038/s41586-020-2649-2
- LiberTEM: Software platform for scalable multidimensional data processing in transmission electron microscopy The Journal of Open Source Software · Open Journals · 2020 10.21105/joss.02006
- Flat electron mirror Ultramicroscopy · Elsevier BV · 2020 10.1016/j.ultramic.2020.113157
- Array programming with NumPy Nature · Nature Portfolio · 2020 10.1038/s41586-020-2649-2
- Autonomous navigation of stratospheric balloons using reinforcement learning Nature · Nature Portfolio · 2020 10.1038/s41586-020-2939-8
- On the map method for electron optics CRC Press eBooks · Informa · 2005 10.1201/9781482269086-25
- hyperspy/hyperspy: Release v1.6.2 2021 10.5281/zenodo.4683076
- Outracing champion Gran Turismo drivers with deep reinforcement learning Nature · Nature Portfolio · 2022 10.1038/s41586-021-04357-7
- Magnetic control of tokamak plasmas through deep reinforcement learning Nature · Nature Portfolio · 2022 10.1038/s41586-021-04301-9
- Principles of electron optics Ultramicroscopy · Elsevier BV · 1989 10.1016/0304-3991(89)90077-6
- Simulation of electron optical systems by differential algebraic method combined with Hermite fitting for practical lens fields Microelectronic Engineering · Elsevier BV · 2004 10.1016/s0167-9317(04)00079-6
- Electron and Ion Optics Springer eBooks · Springer Nature · 1988 10.1007/978-1-4613-0923-9
- The User Adjustable Pole-piece: Expanding TEM Functionality Without Compromise Microscopy and Microanalysis · Oxford University Press · 2022 10.1017/s1431927622010005
- e-DREAM: the European Distributed Research Infrastructure for Advanced Electron Microscopy Microscopy and Microanalysis · Oxford University Press · 2022 10.1017/s1431927622010893
- Automated Design of Electron Mirrors for Multipass Electron Microscopy and 4D-STEM+EELS Microscopy and Microanalysis · Oxford University Press · 2022 10.1017/s1431927622011497
- NanoMi: An open source electron microscope hardware and software platform Micron · Elsevier BV · 2022 10.1016/j.micron.2022.103362
- AtomAI framework for deep learning analysis of image and spectroscopy data in electron and scanning probe microscopy Nature Machine Intelligence · Nature Portfolio · 2022 10.1038/s42256-022-00555-8
- Jupyter Notebooks-a publishing format for reproducible computational workflows eScholarship (California Digital Library) · California Digital Library · 2016
- Principles of electron optics 1996