Start pixStem

Starting Python

The first step is starting an interactive Jupyter Notebook environment.

Linux

Open a terminal and start ipython3:

$ ipython3 notebook

If ipython3 is not available, try ipython:

$ ipython notebook

This will open a browser window (or a new browser tab). Press the “New” button (top right), and start a Python 3 Notebook. In the first cell, run the following commands (paste them, and press Shift + Enter). If you are unfamiliar with the Jupyter Notebook interface, see the Jupyter Notebook guide.

%matplotlib nbagg
import pixstem.api as ps

If this works, continue to the Tutorials. If you get some kind of error, please report it as a New issue on the pixStem GitLab.

Windows

This depends on the installation method:

  • If the HyperSpy bundle was installed, go to the “HyperSpy Bundle” in the start-menu and start “Jupyter Notebook”.
  • If Anaconda was used, go to “Anaconda3” in the start menu, and start “Jupyter Notebook”.

This will open a browser window (or a new browser tab). Press the “New” button (top right), and start a Python 3 Notebook. In the first cell, run the following commands (paste them, and press Shift + Enter). If you are unfamiliar with the Jupyter Notebook interface, see the Jupyter Notebook guide.

%matplotlib nbagg
import pixstem.api as ps

If this works, continue to the Tutorials. If you get some kind of error, please report it as a New issue on the pixStem GitLab.

MacOS

Open the Terminal, and write:

$ jupyter notebook

This will open a browser window (or a new browser tab). Press the “New” button (top right), and start a Python 3 Notebook. In the first cell, run the following commands (paste them, and press Shift + Enter). If you are unfamiliar with the Jupyter Notebook interface, see the Jupyter Notebook guide.

%matplotlib nbagg
import pixstem.api as ps

If this works, continue to the Tutorials. If you get some kind of error, please report it as a New issue on the pixStem GitLab.

Tutorials

To get you started on using pixStem there are tutorials available. The first tutorial Loading data shows how to load the data, while Using the pixelated STEM class shows how to use the PixelatedSTEM class, which contains most of pixStem’s functionality.

The >>> used in the tutorials and documentation means the comment should be typed inside some kind of Python prompt, and can be copy-pasted directly into the Jupyter Notebooks (without the >>>).

pixStem demos

In addition to the guides on this webpage, another good resource is the Introduction to pixStem notebook. This is a pre-filled Jupyter Notebook showing various aspects of pixStem’s functionality.

The Jupyter Notebooks can also be downloaded, and run locally on your computer.