Check out the Hyperspy Workshop May 13-17, 2024 Online

vectors2image#

pyxem.utils.vectors.vectors2image(vectors, image_size, scales, offsets, indexes=None)[source]#

Convert a set of vectors to an image by binning the vectors into a 2D histogram.

Parameters:
  • vectors (numpy.ndarray) – The vectors to be binned

  • image_size (tuple) – The size of the image to be produced

  • scales (tuple) – The scales of the image to be produced

  • offsets (tuple) – The offsets of the image to be produced

  • indexes (tuple) – The indexes of the vectors to be used to create the image. If None, the first two columns are used.