Archives

The principles and architecture of the electromagnetic lens

The fundamental principle of any imaging lens, whether in conventional light optics or electron microscopy, is to manipulate the trajectories of incident radiation, causing them to converge at a focal point. In an electron microscope, this function is performed by electromagnetic lenses, which are typically comprised of precisely wound solenoidal coils. These lenses generate strong, […]

Read More

Writing safer C++ code with concepts

Concepts in C++20 provide a clean way to express what types your templates expect. This makes template code more readable and helps catch type errors at compile time, rather than during debugging. In this example, Printable is a concept that checks if a type can be used with std::cout. The print function can only be […]

Read More