est.core.types.spectrum.Spectrum#

class est.core.types.spectrum.Spectrum(energy: None | ndarray = None, mu: None | ndarray = None, x: None | int = None, y: None | int = None)[source]#

Bases: object

Core object to be used to store larch and pymca results.

Larch is using ‘Group’ to store the results and adds members to this group according to the different treatment. Pymca is using a dictionary to store the results.

This class has to adpat to both behaviors and the different naming convention as well.

Parameters:
  • energy (numpy.ndarray (1D)) – beam energy

  • mu (numpy.ndarray (1D)) – beam absorption

  • x (int) – x index on the spectra

  • y (int) – y index on the spectra

property chi: None | ndarray#
property chir_mag: None | ndarray#
copy()[source]#
property e0: None | ndarray#
property edge_step#
property energy: None | ndarray#

Energy in eV.

Note:

cannot be a Quantity because uses directly by xraylarch and pymca

extra_keys() tuple[source]#
property flatten_mu: None | ndarray#
static from_dict(ddict: dict)[source]#
property ft#
get_missing_keys(keys: Iterable) tuple[source]#

Return missing keys on the spectrum

property k: None | ndarray#
keys() list[source]#
property larch_dict#
load_from_dict(ddict: dict)[source]#
property mu: None | ndarray#
property noise_savgol#
property norm_noise_savgol#
property normalized_energy: None | ndarray#
property normalized_mu: None | ndarray#
property post_edge: None | ndarray#
property pre_edge: None | ndarray#
property pymca_dict#
property r: None | ndarray#
property raw_noise_savgol#
property shape: tuple#
to_dict() dict[source]#
update(obj)[source]#

Update the contained values from the given obj.

Parameters:

obj (Union[XASObject, dict]) –

property x: None | int#
property y: None | int#