erlab.analysis.kspace

Momentum conversion functions.

Typically, the user will not have to call this module directly, but will instead use the erlab.accessors.MomentumAccessor.convert() method.

Angle conventions and function forms are based on Ref. [3].

Functions

get_kconv_func(kinetic_energy, ...)

Return appropriate momentum conversion functions.

kz_func(kinetic_energy, inner_potential, kx, ky)

Calculate the out-of-plane momentum.

Classes

AxesConfiguration(value[, names, module, ...])

Enum class representing different types of axes configurations.

class erlab.analysis.kspace.AxesConfiguration(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

Enum class representing different types of axes configurations.

See Ref. [3].

Type1 = 1
Type1DA = 3
Type2 = 2
Type2DA = 4
erlab.analysis.kspace.get_kconv_func(kinetic_energy, configuration, angle_params)[source]

Return appropriate momentum conversion functions.

The appropriate function is created by the given configuration and kinetic energy.

Parameters:
  • kinetic_energy (float | ndarray[Any, dtype[_ScalarType_co]] | DataArray) – The kinetic energy in eV.

  • configuration (AxesConfiguration) – Experimental configuration.

  • angle_params (dict[str, float]) – Dictionary of required angle parameters. If the configuration has a DA, the parameters should be delta, chi, chi0, xi, and xi0. Otherwise, they should be delta, xi, xi0, and beta0, following the notation in Ref. [3].

Returns:

  • forward_func (Callable) – Forward function that takes \((α, β)\) and returns \((k_x, k_y)\).

  • inverse_func (Callable) – Inverse function that takes \((k_x, k_y)\) or \((k_x, k_y, k_z)\) and returns \((α, β)\). If \(k_z\) is given, it will return the angles broadcasted to \(k_z\) instead of the provided kinetic energy.

Raises:

ValueError – If the given configuration is not valid.

Return type:

tuple[Callable, Callable]

Note

  • The only requirement for the input parameters of the returned functions is that the shape of the input angles must be broadcastable with each other, and with the shape of the kinetic energy array. This means that the shape of the output array can be controlled By adjusting the shape of the input arrays. For instance, if the kinetic energy is given as a (L, 1, 1) array, \(k_x\) as a (1, M, 1) array, and \(k_y\) as a (1, 1, N) array, the output angle arrays \(α\) and \(β\) will each be broadcasted to a (L, M, N) array which can be directly used for interpolation.

  • However, the user will not have to worry about the shape of the input arrays, because using xarray.DataArray objects as the input will most likely broadcast the arrays automatically!

erlab.analysis.kspace.kz_func(kinetic_energy, inner_potential, kx, ky)[source]

Calculate the out-of-plane momentum.

\(k_z\) is computed from the given kinetic energy \(E_k\), inner potential \(V_0\), and in-plane momenta \(k_x\), and \(k_y\) by

\[k_z = \sqrt{k^2 - k_x^2 - k_y^2 + \frac{2 m_e V_0}{\hbar^2}}\]

where \(k =\sqrt{2 m_e E_k}/\hbar\).