Calculates an unique hash given by the energy \(E\), \(q_z\) range, polarization states and the strain_vectors as well as the sample structure hash for relevant x-ray parameters.
Calculates the polarization factor \(P(\vartheta)\) for a given incident angle \(\vartheta\) for the case of s-polarization (pol = 0), or p-polarization (pol = 1), or unpolarized X-rays (pol = 0.5):
Calculates an unique hash given by the energy \(E\),
\(q_z\) range, polarization states and the strain_vectors as
well as the sample structure hash for relevant x-ray parameters.
Optionally, part of the strain_map is used.
Parameters:
strain_vectors (dict{ndarray[float]}) – reduced strains per unique
layer.
Calculates the polarization factor \(P(\vartheta)\) for a given
incident angle \(\vartheta\) for the case of s-polarization
(pol = 0), or p-polarization (pol = 1), or unpolarized X-rays
(pol = 0.5):
Calculates an unique hash given by the energy \(E\), \(q_z\) range, polarization states and the strain_vectors as well as the sample structure hash for relevant x-ray parameters.
Calculates the polarization factor \(P(\vartheta)\) for a given incident angle \(\vartheta\) for the case of s-polarization (pol = 0), or p-polarization (pol = 1), or unpolarized X-rays (pol = 0.5):
Calculates the reflected field \(E_p^t\) of the whole sample
structure as well as for each sub-structure (\(E_p^N\)). The
reflected wave field \(E_p\) from a single layer of unit cells at
the detector is calculated according to Ref. [9]:
with \(e\) as electron charge, \(m_e\) as electron
mass, \(c_0\) as vacuum light velocity,
\(\varepsilon_0\) as vacuum permittivity,
\(P\) as polarization factor and \(S(E,q_z,\sigma)\)
as energy-, angle-, and strain-dependent unit cell structure
factor.
Calculates an unique hash given by the energy \(E\),
\(q_z\) range, polarization states and the strain_vectors as
well as the sample structure hash for relevant x-ray parameters.
Optionally, part of the strain_map is used.
Parameters:
strain_vectors (dict{ndarray[float]}) – reduced strains per unique
layer.
Calculates the polarization factor \(P(\vartheta)\) for a given
incident angle \(\vartheta\) for the case of s-polarization
(pol = 0), or p-polarization (pol = 1), or unpolarized X-rays
(pol = 0.5):
Returns the reflectivity of an inhomogeneously strained sample structure for a given strain_map in position and time, as well as for a given set of possible strains for each unit cell in the sample structure (strain_vectors).
Returns the reflectivity of an inhomogeneously strained sample structure for a given strain_map in position and time, as well as for a given set of possible strains for each unit cell in the sample structure (strain_vectors).
Returns the reflectivity of an inhomogeneously strained sample structure for a given strain_map in position and time, as well as for a given set of possible strains for each unit cell in the sample structure (strain_vectors).
Sub-function of calc_inhomogeneous_reflectivity() and for parallel computing (needs to be static) only for calculating the total reflection-transmission matrix \(M_{RT}^t\):
Sub-function of calc_inhomogeneous_reflectivity() and for parallel computing (needs to be static) only for looking up the total reflection-transmission matrix \(M_{RT}^t\):
Returns a list of all reflection-transmission matrices for each unique unit cell in the sample structure for a given set of applied strains for each unique unit cell given by the strain_vectors input.
Calculates a list of all reflection-transmission matrices for each unique unit cell in the sample structure for a given set of applied strains to each unique unit cell given by the strain_vectors input.
Calculates an unique hash given by the energy \(E\), \(q_z\) range, polarization states and the strain_vectors as well as the sample structure hash for relevant x-ray parameters.
Calculates the polarization factor \(P(\vartheta)\) for a given incident angle \(\vartheta\) for the case of s-polarization (pol = 0), or p-polarization (pol = 1), or unpolarized X-rays (pol = 0.5):
Calculates the reflectivity \(R\) of the whole sample structure
and the reflectivity-transmission matrices \(M_{RT}\) for
each substructure. The reflectivity of the \(2\times 2\)
matrices for each \(q_z\) is calculates as follow:
Calculates the reflectivity-transmission matrices \(M_{RT}\) of
the whole sample structure as well as for each sub-structure.
The reflectivity-transmission matrix of a single unit cell is
calculated from the reflection-transmission matrices \(H_i\)
of each atom and the phase matrices between the atoms \(L_i\):
\[M_{RT} = \prod_i H_i \ L_i\]
For \(N\) similar layers of unit cells one can calculate the
\(N\)-th power of the unit cell \(\left(M_{RT}\right)^N\).
The reflection-transmission matrix for the whole sample
\(M_{RT}^t\) consisting of \(j = 1\ldots M\)
sub-structures is then again:
Returns the reflectivity of an inhomogeneously strained sample
structure for a given strain_map in position and time, as well
as for a given set of possible strains for each unit cell in the
sample structure (strain_vectors).
If no reflectivity is saved in the cache it is caluclated.
Providing the calc_type for the calculation the corresponding
sub-routines for the reflectivity computation are called:
parallel parallelization over the time steps utilizing
Dask
distributed not implemented in Python, but should be possible
with Dask as well
Returns the reflectivity of an inhomogeneously strained sample structure
for a given strain_map in position and time, as well as for a given
set of possible strains for each unit cell in the sample structure
(strain_vectors). The function calculates the results sequentially
without parallelization.
Returns the reflectivity of an inhomogeneously strained sample structure
for a given strain_map in position and time, as well as for a given
set of possible strains for each unit cell in the sample structure
(strain_vectors). The function parallelizes the calculation over the
time steps, since the results do not depend on each other.
Calculates the reflectivity of a inhomogeneous sample structure for
given strain_vectors for a single time step. Similar to the
homogeneous sample structure, the reflectivity of an unit cell is
calculated from the reflection-transmission matrices \(H_i\) of
each atom and the phase matrices between the atoms \(L_i\) in the
unit cell:
\[M_{RT} = \prod_i H_i \ L_i\]
Since all layers are generally inhomogeneously strained we have to
traverse all individual unit cells (\(j = 1\ldots M\)) in the
sample to calculate the total reflection-transmission matrix
\(M_{RT}^t\):
\[M_{RT}^t = \prod_{j=1}^M M_{RT,j}\]
The reflectivity of the \(2\times 2\) matrices for each \(q_z\)
is calculates as follow:
Sub-function of calc_inhomogeneous_reflectivity() and for
parallel computing (needs to be static) only for calculating the
total reflection-transmission matrix \(M_{RT}^t\):
\[M_{RT}^t = \prod_{j=1}^M M_{RT,j}\]
Parameters:
strains (ndarray[float]) – spatial strain profile for single time
step.
temps (ndarray[float]) – spatial temperature profile for single time
step.
Sub-function of calc_inhomogeneous_reflectivity() and for
parallel computing (needs to be static) only for looking up the
total reflection-transmission matrix \(M_{RT}^t\):
Returns a list of all reflection-transmission matrices for each
unique unit cell in the sample structure for a given set of applied
strains for each unique unit cell given by the strain_vectors
input. If this data was saved on disk before, it is loaded, otherwise
it is calculated.
Parameters:
args (list[ndarray[float]], optional) – reduced strains per unique
layer.
Returns:
RTM (list[ndarray[complex]]) – reflection-transmission matrices for
all given strains per unique layer.
Calculates a list of all reflection-transmission matrices for each
unique unit cell in the sample structure for a given set of applied
strains to each unique unit cell given by the strain_vectors input.
Args::
args (list[ndarray[float]], optional): reduced strains per unique
layer.
Returns:
RTM (list[ndarray[complex]]) – reflection-transmission matrices for
all given strains per unique layer.
Calculates an unique hash given by the energy \(E\),
\(q_z\) range, polarization states and the strain_vectors as
well as the sample structure hash for relevant x-ray parameters.
Optionally, part of the strain_map is used.
Parameters:
strain_vectors (dict{ndarray[float]}) – reduced strains per unique
layer.
Calculates the polarization factor \(P(\vartheta)\) for a given
incident angle \(\vartheta\) for the case of s-polarization
(pol = 0), or p-polarization (pol = 1), or unpolarized X-rays
(pol = 0.5):
Calculates an unique hash given by the energy \(E\), \(q_z\) range, polarization states as well as the sample structure hash for relevant x-ray and magnetic parameters.
Returns the reflectivity and transmissivity of an inhomogeneously strained and magnetized sample structure for a given _strain_map_ and _magnetization_map_ in space and time for each unit cell or amorphous layer in the sample structure.
Returns the reflectivity and transmission of an inhomogeneously strained sample structure for a given strain_map and magnetization_map in space and time.
Returns the reflectivity and transmission of an inhomogeneously strained sample structure for a given strain_map and magnetization_map in space and time.
Calculates the polarization factor \(P(\vartheta)\) for a given incident angle \(\vartheta\) for the case of s-polarization (pol = 0), or p-polarization (pol = 1), or unpolarized X-rays (pol = 0.5):
Calculates the actual reflectivity and transmissivity from the reflectivity-transmission matrix for a given incoming and analyzer polarization from Elzo formalism [10].
Calculates the Kerr rotation and ellipticity for sigma and pi incident polarization from the reflectivity-transmission matrix independent of the given incoming and analyzer polarization from Elzo formalism [10].
Calculates an unique hash given by the energy \(E\), \(q_z\)
range, polarization states as well as the sample structure hash for
relevant x-ray and magnetic parameters. Optionally, part of the
strain_map and magnetization_map are used.
Parameters:
**kwargs (ndarray[float]) – spatio-temporal strain and magnetization
profile.
Sets the incoming polarization factor for circular +, circular -, sigma,
pi, unpolarized, and elliptical polarization.
In the case of elliptical polarization a single or list of tuple of the
azimuth angle \(\alpha\) and the ellipticity \(e\) of the
polarization can be input.
\(0° \leq \alpha \leq +180°\)\(-1 \leq e \leq +1\)
Parameters:
pol_in_state (int) – incoming polarization state id.
Sets the outgoing polarization factor for circular +, circular -, sigma,
pi, unpolarized, and elliptical polarization.
In the case of elliptical polarization a single or list of tuple of the
azimuth angle \(\alpha\) and the ellipticity \(e\) of the
polarization can be input.
\(0° \leq \alpha \leq +180°\)\(-1 \leq e \leq +1\)
Parameters:
pol_out_state (int) – outgoing polarization state id.
are calculated for every substructure \(m\) before post-processing
the incoming and analyzer polarizations and calculating the actual
reflectivities as function of energy and \(q_z\).
Parameters:
args (ndarray[float], optional) – strains and magnetization for each
sub-structure.
Returns:
(tuple) –
R (ndarray[float]) - homogeneous reflectivity.
R_phi (ndarray[float]) - homogeneous reflectivity for opposite
magnetization.
Returns the reflectivity and transmissivity of an inhomogeneously
strained and magnetized sample structure for a given _strain_map_
and _magnetization_map_ in space and time for each unit cell or
amorphous layer in the sample structure. If no reflectivity is
saved in the cache it is caluclated. Providing the calc_type
for the calculation the corresponding sub-routines for the
reflectivity computation are called:
parallel parallelization over the time steps utilizing
Dask
distributed not implemented in Python, but should be possible
with Dask as well
Returns the reflectivity and transmission of an inhomogeneously strained
sample structure for a given strain_map and magnetization_map in
space and time. The function calculates the results sequentially for every
layer without parallelization.
Returns the reflectivity and transmission of an inhomogeneously strained
sample structure for a given strain_map and magnetization_map in
space and time. The function tries to parallelize the calculation over the
time steps, since the results do not depend on each other.
Returns the boundary and phase matrices of an atom from Elzo
formalism [10]. The results for a given atom, energy, \(q_z\),
polarization, and magnetization are stored to RAM to avoid recalculation.
Calculates the polarization factor \(P(\vartheta)\) for a given
incident angle \(\vartheta\) for the case of s-polarization
(pol = 0), or p-polarization (pol = 1), or unpolarized X-rays
(pol = 0.5):
Calculates the actual reflectivity and transmissivity from the
reflectivity-transmission matrix for a given incoming and analyzer
polarization from Elzo formalism [10].
Calculates the Kerr rotation and ellipticity for sigma and pi
incident polarization from the reflectivity-transmission
matrix independent of the given incoming and analyzer polarization
from Elzo formalism [10].