Note
Go to the end to download the full example code.
Ragged Points#
As for ragged signals, the number of markers at each position can vary and this is done by passing a ragged array to the constructor of the markers.
Create a signal
import hyperspy.api as hs
import numpy as np
# Create a Signal2D with 2 navigation dimensions
rng = np.random.default_rng(0)
data = np.arange(25*100*100).reshape((25, 100, 100))
s = hs.signals.Signal2D(data)
Create the ragged array with varying number of markers for each navigation position
sphinx_gallery_thumbnail_number = 2
Total running time of the script: (0 minutes 1.321 seconds)