Sample Datasets

Public datasets

Some data to work with can be downloaded from Zenodo.

Link

Description

Format

Dimension

Size

Bullseye and circular probe diffraction [OS19][ZMB+19]

Scanning convergent beam electron diffraction data of gold nanoparticles (4DSTEM_experiment/data/datacubes/polyAu_4DSTEM/data) and simulated strained gold (4DSTEM_experiment/data/datacubes/simulation_4DSTEM/data) with one file using a standard circular aperture and another using a bullseye aperture.

HDF5 (uint16)

4D

(100, 84, 250, 250)

2.1 GB

Electron Bessel beam diffraction [GGM+19b][GGM+19a]

Scanning convergent beam electron diffraction with ring-shaped aperture and overlapping diffraction orders.

Stack of DM3 (currently only scripting)

3D

2.6 GB

Creating random data

Random data can be generated in the following way. It should be kept in mind that the data generated in this way can only be used for simple testing as it has no physical significance.

Raw file:

# Create sample raw file
import numpy as np
sample_data = np.random.randn(16, 16, 16, 16).astype("float32")
sample_data.tofile("raw_sample.raw")
# Load through Python API
from libertem.api import Context
if __name__ == '__main__':
  ctx = Context()
  ds = ctx.load("raw", path="./raw_sample.raw", scan_size=(16, 16), dtype="float32", detector_size=(16, 16))

HDF5 file:

# Create sample HDF5 file
import h5py
import numpy as np
file = h5py.File('hdf5_sample.h5','w')
sample_data = np.random.randn(16,16,16,16).astype("float32")
dataset = file.create_dataset("dataset",(16,16,16,16), data=sample_data)
file.close()
# Load through Python API
from libertem.api import Context
if __name__ == '__main__':
  ctx = Context()
  ds = ctx.load("hdf5", path="./hdf5_sample.h5", ds_path="/dataset")

Alternatively, you can enter the parameters (scan_size, dtype, detector_size) directly into the load dialog of the GUI. For more details on loading, please check Loading data.