abtem.core.energy#

Module for handling electron energy.

Module Contents#

Classes#

Accelerator

Accelerator object describes the energy of wave functions and transfer functions.

HasAcceleratorMixin

Mixin class for objects that have an electron energy.

Functions#

energy2mass

Calculate relativistic mass from energy.

energy2sigma

Calculate interaction parameter from energy.

energy2wavelength

Calculate relativistic de Broglie wavelength from energy.

reciprocal_space_sampling_to_angular_sampling

Convert reciprocal space sampling in 1/Å to angular sampling in mrad.

relativistic_mass_correction

Calculate relativistic mass correction from energy.

resolve_energy

Data#

T

API#

class abtem.core.energy.Accelerator(...)[source]#

Bases: abtem.core.utils.EqualityMixin, abtem.core.utils.CopyMixin

Accelerator object describes the energy of wave functions and transfer functions.

Parameters:

energy (float) – Acceleration energy [eV].

Initialization

check_is_defined()[source]#

Raise error if the energy is not defined.

check_match(...)[source]#

Raise error if the accelerator of another object is different from this object.

Parameters:

other (Accelerator object) – The accelerator that should be checked.

property energy: float | None#

Electron acceleration energy [eV].

match(...)[source]#

Set the parameters of this accelerator to match another accelerator.

Parameters:
  • other (Accelerator object) – The accelerator that should be matched.

  • check_match (bool) – If true check whether accelerators can match without overriding an already defined energy.

property sigma: float#

Interaction parameter.

property wavelength: float#

Relativistic wavelength [Å].

exception abtem.core.energy.EnergyUndefinedError[source]#

Bases: Exception

Error raised when energy is not defined.

Initialization

Initialize self. See help(type(self)) for accurate signature.

class abtem.core.energy.HasAcceleratorMixin[source]#

Mixin class for objects that have an electron energy.

property accelerator: Accelerator#

Accelerator object describing the acceleration energy.

property energy: float | None#

Electron acceleration energy in electron volts.

property wavelength: float#

Relativistic wavelength in Ångstrom.

abtem.core.energy.T#

‘TypeVar(…)’

abtem.core.energy.energy2mass(...) float[source]#

Calculate relativistic mass from energy.

Parameters:

[eV]. (enerElectron energy)

Returns:

Relativistic mass [kg]̄

Return type:

float

abtem.core.energy.energy2sigma(...) float[source]#

Calculate interaction parameter from energy.

Parameters:

energy (float) – Energy [ev].

Returns:

Interaction parameter [1 / (Å * eV)].

Return type:

float

abtem.core.energy.energy2wavelength(...) float[source]#

Calculate relativistic de Broglie wavelength from energy.

Parameters:

energy (float) – Energy [eV].

Returns:

Relativistic de Broglie wavelength [Å].

Return type:

float

abtem.core.energy.reciprocal_space_sampling_to_angular_sampling(...) abtem.core.energy.T[source]#

Convert reciprocal space sampling in 1/Å to angular sampling in mrad.

Parameters:
  • reciprocal_space_sampling (tuple of floats) – Reciprocal space sampling [1/Å].

  • energy (float) – Electron energy in [eV].

Returns:

Angular sampling [mrad].

Return type:

tuple of floats

abtem.core.energy.relativistic_mass_correction(...) float[source]#

Calculate relativistic mass correction from energy.

Parameters:

energy (float) – Electron energy [eV].

Returns:

Relativistic mass correction.

Return type:

float

abtem.core.energy.resolve_energy(...) Optional[float][source]#