pymatgen.analysis.xas.spectrum module

This module defines classes to represent all xas and stitching methods

class XAS(x, y, structure, absorbing_element, edge='K', spectrum_type='XANES')[source]

Bases: pymatgen.core.spectrum.Spectrum

Basic XAS object.

  • x – A sequence of x-ray energies in eV

  • y – A sequence of mu(E)

  • structure (Structure) – Structure associated with the spectrum

  • absorbing_element (Element) – Element associated with the spectrum

  • edge (str) – Absorption edge associated with the spectrum

  • spectrum_type (str) – ‘XANES’ or ‘EXAFS’

Initializes a spectrum object.

XLABEL = 'Energy'[source]
YLABEL = 'Intensity'[source]
stitch(other: pymatgen.analysis.xas.spectrum.XAS, num_samples: int = 500, mode: str = 'XAFS') → pymatgen.analysis.xas.spectrum.XAS[source]

Stitch XAS objects to get the full XAFS spectrum or L23 edge XANES spectrum depending on the mode.

  1. Use XAFS mode for stitching XANES and EXAFS with same absorption edge.

    The stitching will be performed based on wavenumber, k. for k <= 3, XAS(k) = XAS[XANES(k)] for 3 < k < max(xanes_k), will interpolate according to

    XAS(k)=f(k)*mu[XANES(k)]+(1-f(k))*mu[EXAFS(k)] where f(k)=cos^2((pi/2) (k-3)/(max(xanes_k)-3)

    for k > max(xanes_k), XAS(k) = XAS[EXAFS(k)]

  2. Use L23 mode for stitching L2 and L3 edge XANES for elements with

    atomic number <=30.

  • other – Another XAS object.

  • num_samples (int) – Number of samples for interpolation.

  • mode (str) – Either XAFS mode for stitching XANES and EXAFS or L23 mode for stitching L2 and L3.


The stitched spectrum.

Return type

XAS object