ptyrad.optics.constants#

Electron microscopy related physical constants

Functions

get_EM_constants(kv, output_type)

Calculates a specific electron microscopy physical parameter.

get_interaction_parameter_sigma(kv)

Calculates the electron interaction parameter (sigma).

get_lorentz_factor_gamma(kv)

Calculates the dimensionless relativistic Lorentz factor (gamma).

get_wavelength_ang(kv)

Calculates the relativistic electron wavelength (Ang).

ptyrad.optics.constants.get_EM_constants(kv, output_type)[source]#

Calculates a specific electron microscopy physical parameter.

Parameters:
  • kv (float) – The acceleration voltage of the electron microscope in kilovolts (kV).

  • output_type (Literal['gamma', 'wavelength', 'sigma']) – The specific parameter to calculate. Options are ‘gamma’ (Lorentz factor), ‘wavelength’ (relativistic electron wavelength), or ‘sigma’ (interaction parameter).

Returns:

The calculated parameter value.

Return type:

float

Raises:

ValueError – If an unsupported output_type is provided.

ptyrad.optics.constants.get_lorentz_factor_gamma(kv)[source]#

Calculates the dimensionless relativistic Lorentz factor (gamma).

The Lorentz factor accounts for the relativistic mass increase of the accelerated electron. It is calculated as: gamma = 1 + (e * V) / (m0 * c^2)

Parameters:

kv (float) – The acceleration voltage in kilovolts (kV).

Returns:

The dimensionless Lorentz factor.

Return type:

float

ptyrad.optics.constants.get_wavelength_ang(kv)[source]#

Calculates the relativistic electron wavelength (Ang).

The wavelength is calculated using the relativistic de Broglie relationship: lambda = h * c / sqrt((2 * m0 * c^2 + e * V) * e * V)

Parameters:

kv (float) – The acceleration voltage in kilovolts (kV).

Returns:

The electron wavelength in Angstroms.

Return type:

float

ptyrad.optics.constants.get_interaction_parameter_sigma(kv)[source]#

Calculates the electron interaction parameter (sigma).

The interaction parameter governs the phase shift of the electron wave per unit of projected electrostatic potential. It is calculated as: sigma = (2 * pi * gamma * m0 * e * lambda) / h^2

Parameters:

kv (float) – The acceleration voltage in kilovolts (kV).

Returns:

The interaction parameter in units of 1 / (kV * Angstrom).

Return type:

float