Hands-on Tutorial: HyperSpy – Multidimensional data analysis using python
Tutorial for the DPG Spring Meeting of the Condensed Matter Section (SKM) 2026
Dresden, March 8, 2026 | 16:00-18:15 h
Note: This tutorial is still work in progress, the final version will be available latest on March 1, 2026
Dear attendants of the tutorial session at DPG Dresden,
we are happy to introduce you to data analysis using HyperSpy and its extensions RosettaSciIO, LumiSpy, exSPy and pyXem.
To follow the interactive tutorials and make maximum use of the limited time available, we kindly ask you to bring your laptop and execute the following three steps prior to arriving at the tutorial (for further details see below):
- Install HyperSpy
- Download the example notebooks by clicking the button below and extract the Zip file to a folder on your system
- Verify that you can load and execute the first sample notebook
Remember to bring a fully charged battery, as there will be limited power outlets in the room.
Follow the installation guide for the HyperSpy bundle. The HyperSpy bundle ships a python environment including all relevant packages. The demo notebooks have been tested to run on the HyperSpy bundle version 2025.12.06. Some of the examples might not run with older HyperSpy versions (<2.0.0 / bundle releases up to 2023.11.20) and we do not guarantee for operation with newer HyperSpy versions, though the syntax/API should not change until the next major release (v3.0.0) will be released.
If you already have python installed on your system and prefer not installing the bundle, we recommend creating a new environment for the tutorial and installing at least the following packages using pip or conda:
hyperspy, exspy, pyxem, lumispy, hyperspy-gui-ipywidgets, jupyter-lab, ipympl, scikit-learn, numba
Note that you should have at least version 1.26.4 of numpy installed.
Otherwise, have a look at the full list of packages included in the HyperSpy-bundle.
The tutorials are based on Jupyter Notebooks.
Download the tutorial notebooks and demo data as zip file from this repository and unpack in a local directory.
The tutorial is split in four jupyter notebooks to cater both for participants with ot without precious experience using HyperSpy:
DPG26_1_HyperSpy-RosettaSciIO.ipynb- A basic introduction to get started with core functionalitieDPG26_2_LumiSpy.ipynb- for luminescence spectroscopyDPG26_3_exSPY.ipynb- for electron energy loss spectroscopy (EELS)DPG26_4_pyXem.ipynb- for crystallographic diffraction microscopy, e.g. 4D-STEM
The relevant datasets are provided in the subfolder data.
Beforehand, please try to already launch jupyter-lab on your computer, open the first tutorial notebook and try to run the first cell - to ensure your local installation is working and debug your installation if needed. That way, we can directly dive into the HyperSpy usage during the tutorials.
There are multiple ways to start jupyter-lab, see for example the JupyterLab User Guide or the Ansys JupyterLab Quick Start Guide. If you installed the HyperSpy bundle:
- (on Windows): you will find the "HyperSpy-bundle prompt" in your Start Menu. Open this application, and change to the directory where you unzipped the files via the
cdcommand. Once in the right directory, execute thejupyter labcommand to start Jupyter - (on MacOS or Linux): from a terminal window, change to the directory where you unzipped the files, and execute the
jupytercommand from thebin/directory of the bundle installation. This will look something like:cd /Users/username/Downloads/hyperspy_tutorial//Users/username/hyperspy-bundle/bin/jupyter lab
(if you run into problems, come a bit early - a number of experienced colleagues can help you get started)
If you are new to programming or programming with python, we recommend the W3 schools Python Tutorial.
While we recommend downloading this repository and running the code locally (since that will be how you use HyperSpy on your own data), you can use the following link to interactively run these tutorial files in your web browser (may be slow):
(Non-interactive) Visualizing the tutorial notebooks online: