est.core.types.spectra.Spectra#

class est.core.types.spectra.Spectra(energy, spectra: Iterable | None = None)[source]#

Bases: object

A map of spectrum.

  • data: numpy array of Spectrum. Expected to be 2D.

  • energy: set of energy for each position (x,y)

as_ndarray(key: str) ndarray[source]#

Convert the spectra to a numpy ndarray. The shape of the array will be adapted according to the ‘relative_to’ parameter.

Parameters:

key – spectra field to be converted to a numpy ndarray (of dimension two). Key must be in (‘mu’, ‘normalized_mu’)

check_validity()[source]#
property data#
property energy: ndarray#

Energy in eV

static from_dict(ddict, dimensions)[source]#
Parameters:
  • ddict (dict) – dict containing the data to be loaded

  • dimensions (tuple) – information regarding spectra dimensions

reshape(shape)[source]#
property shape#