Electron optics in electric and magnetic lenses. Uses the axisymmetric view, computes static E- and B-fields, enables the parameterization of ion and electron beams, and allows you to view their trajectories in the vicinity of various kinds of electromagnetic lenses, with physically accurate and relativistically corrected dynamics. Allows for custom mesh sizes using the finite difference method, and is incredibly performant due to integrations with PyAMG, Numba, and Joblib. Works on all operating systems, is unit-tested, and works locally and on Jupyter Notebook with all dependencies handled by PyPi.
Currently under peer review at PyOpenSci and the Journal of Open Source Software (JOSS), having successfully passed editorial pre-review. Built as the official simulation tool of the Hume S1, an in-progress, high-resolution, low-cost SEM.
pip install pichtAPI documentation, computational physics methods, and tutorials can be found at the official website: https://rolypolytoy.github.io/picht/.
All of the examples in the gallery were scripted with under 100 lines of code and generated in under a minute of real time.
Focusing electrons with a cylindrical electrostatic lens. Reference implementation here

Focusing electrons with a magnetic lens. Reference implementation here

Focusing electrons with three electrodes in a unipotential lens arrangement. Reference implementation here.

Controlling electrons with a Wehnelt cylinder, cathode/anode, a condenser (einzel) lens and an objective (einzel) lens. Reference implementation here.
