Larch and pymca compatibility¶
The library is using the XASObject
to associate larch and pymca treatments and create as much as possible a bridge between those two.
Here is a small summary about current (August 2019) larch processes and pymca processes :
Original functions goals:
larch functions |
pymca functions |
description |
is currently accessible from est |
---|---|---|---|
processSpectrum |
compute all variables for the given spectrum |
YES |
|
fourierTransform |
compute spectrum for fourier transform spectroscopy |
YES |
|
postEdge |
YES |
||
normalize |
spectrum normalization |
YES |
|
pre_edge |
Pre-edge subtraction and normalization - determine E0 - fit a line of polynomial to the region below the edge - fit a polynomial to the region above the edge - extrapolate the two curves to E0 to determine the edge jump |
YES |
|
pre_edge_baseline |
needed for metal oxides to determine oxidation state and molecular configuration. To analyze the energies and relative strengths of these pre-edge peaks. |
NO |
|
mback |
an alternative to pre_edge ? data are matched to the tabulated values of the imaginary part of the energy-dependent correction to the Thompson scattering factor |
YES |
|
over_absorption correction |
needed for fluorescence when too much of the total X-ray absorption coefficient is from the absorbing element |
NO |
|
spectral deconvolution |
to compare XAFS data from different source |
NO |
|
pre-edge peak fitting |
X-ray Absorption Near Edge Structure technique |
NO |
|
Linear Combination Analysis |
X-ray Absorption Near Edge Structure technique |
NO |
|
PCA |
X-ray Absorption Near Edge Structure technique |
NO |
|
autobk |
Post-edge Background Subtraction Background subtraction, convert mu to \(\chi(k)\) for quantitative analysis (post_edge background function) |
YES |
|
xftf |
Forward XAFS Fourier transforms forward Fourier transform converts \(\chi(k)\) to \(\chi(R)\) and is of primary importance for XAFS analysis |
YES |
|
xftr |
Reverse XAFS Fourier transforms |
NO |
|
ftwindow |
Generating Fourier transform windows |
NO |
|
cauchy_wavelet |
Continuous Cauchy Wavelet transform of Munoz et al |
NO |
|
reading and using Feff paths |
NO |
||
fitting XAFS to Feff paths |
NO |
||
computing anomalous scattering factors from XAFS data |
NO |
From it we can create the theoretical related functions:
goal |
larch function(s) |
pymca function(s) |
Notes |
---|---|---|---|
pre edge sub and normalization |
pre_edge |
normalize |
|
post edge substraction |
autobk |
EXAFS (postEdge (include postEdge) |
|
fourier transform |
xftf |
fourier transform |
Finally this is the list of variables used in larch and pymca. An important point is that larch uses a ‘group’ and can store any of this values ‘on the fly’ during the processing. Pymca uses dictionary as ‘XASObject’ to store results. So XASObject has to adapt to both behavior as much as possible.
larch variables |
pymca variables |
info |
---|---|---|
norm |
normalized spectrum, using polynomial |
|
norm_area |
normalized mu(E), using integrated area |
|
edge_step |
edge step of spectrum |
|
flat |
flattened, normalized mu(E) |
|
pre_edge |
determined pre-edge curve |
|
post_edge |
determined post-edge, normalization curve |
|
dmude |
derivative of mu(E) |
|
fpp |
mback matched spectrum |
|
f1 |
tabulated f1(E) |
|
f2 |
tabulated f2(E) |
|
delta_bkg |
||
delta_chi |
||
e0 |
_energy0 |
energy origin/offset |
chi |
EXAFSValues |
|
chie |
||
bkg |
||
k |
k |
|
kmin |
kmin |
|
kmax |
kmax |
|
knots |
||
KWeight |
||
KnotsX |
x position of knots |
|
KnotsY |
y position of knots |
|
PostEdgeK |
||
PostEdgeB |
||
energy |
Energy |
|
mu |
Mu |
|
Jump |
||
edge |
||
NormalizedEnergy |
||
NormalizedMu |
||
NormalizedBackground |
||
NormalizedSignal |
||
EXAFSEnergy |
||
EXAFSValues |
||
EXAFSSignal |
||
EXAFSNormalized |
||
FT
|
dictionary containing fourier transform result |
|
kwin |
window function Omega(k) (length of input chi(k)) |
|
r |
uniform array of R, out to rmax_out |
|
chir |
complex array of chi(R) |
|
chir_mag |
magnitude of of chi(R) |
|
chir_re |
real part of of chi(R) |
|
chir_im |
imaginary part of of chi(R) |
|
chir_pha |
phase of of chi(R) |
|
chir |
complex array of chi(R) |