Skip to content

Commit

Permalink
Fixed lists.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomaSusi committed Jul 27, 2024
1 parent b9a68db commit 913cf63
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions 02_code.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,22 @@ numbering:
Python has inarguably become the leading programming language in the scientific community, continually gaining popularity for the past two decades. This is due to Python being friendly for beginners, owing to its less strict language structure (dynamic typing, automatic memory management, non-compiled language) and the plethora of tutorials and examples. It also benefits from being free (this text would be less accessible if it required a licence), with numerous high quality libraries covering a broad range of applications (numeric calculations, image analysis, machine learning, ...), including a number of packages dedicated to S/TEM. The diverse and broad scope of the python ecosystem allows for interoperability between different domains, and file formats as well as easily re-purposing existing implementations algorithms to new domains.

There are a number of libraries dedicated to S/TEM:
\begin{itemize}
\item *ab*TEM - All-Python S/TEM image simulation
\item pyPrismatic - Image simulation (Python wrapper to C++ package Prismatic)
\item pyMultislice - Image simulation
\item py4DSTEM - 4D-STEM analysis
\item libreTEM - 4D-STEM analysis
\item pyxem - 4D-STEM
\item Hyperspy - General S/TEM analysis
\item ...
\end{itemize}
- *ab*TEM - All-Python S/TEM image simulation
- pyPrismatic - Image simulation (Python wrapper to C++ package Prismatic)
- pyMultislice - Image simulation
- py4DSTEM - 4D-STEM analysis
- libreTEM - 4D-STEM analysis
- pyxem - 4D-STEM
- Hyperspy - General S/TEM analysis
- ...

The main libraries used here are:
\begin{itemize}
\item NumPy (np) - fast numerical calculations
\item CuPy (cp) - drop-in replacement for NumPy to run on GPUs
\item Numba - just-in-time Python compiler for scientific and array-oriented computing
\item matplotlib - plotting
\item ipywdigets - making interactive figures
\item ASE (Atomic Simulation Environment) - creating and visualizing atomic structures
\item ...
\end{itemize}
- NumPy (np) - fast numerical calculations
- CuPy (cp) - drop-in replacement for NumPy to run on GPUs
- Numba - just-in-time Python compiler for scientific and array-oriented computing
- matplotlib - all things plotting
- ipywdigets - making interactive figures
- ASE (Atomic Simulation Environment) - creating and visualizing atomic structures
- ...

Dynamically interpreted languages including Python are particularly attractive for domain experts and scientists trying out new ideas, but the performance of the interpreter can be a barrier to high performance. However, by making appropriate use of Python open-source numerical libraries including NumPy, CuPy, and Numba, it is possible to write a purely Python-based code that performs as well or even better than prior codes based on traditional languages such C++ or Fortran. That is indeed what *ab*TEM has been able to achieve, which has made it one of the fastest-growing and popular tools for S/TEM simulations, and our choice for this text.

0 comments on commit 913cf63

Please sign in to comment.