abtem.finite_difference#

Module Contents#

Classes#

Functions#

conventional_operator

Split-step real-space multislice operator used in all higher-order expansions.

finite_difference_coefficients

full_series

Full Taylor series expansion of the MS Eq.(14) in Ultramicrscopy 134 (2013) 135-143. override_prefactor used in backscatter call, Eq. (13) in Micron 190 (2025) 103778.

multislice_step

Performs a single multislice step.

propagator_taylor_series

Taylor series expansion of the propagator term in the MS equation. Eq.(8) in Ultramicroscopy 134 (2013) 135-143.

Data#

API#

exception abtem.finite_difference.DivergedError(...)[source]#

Bases: Exception

class abtem.finite_difference.LaplaceOperator(...)[source]#

Initialization

Centered finite-difference laplacian operator.

Parameters:

accuracy (int) – centered finite-difference stencil accuracy

apply(...)[source]#
get_stencil(...) Callable[source]#

Cached method to return finite-difference stencil using specified waves parameters, namely wavelength and sampling for the prefactor.

Parameters:
  • waves (Waves) – Waves object stencil will ultimately be applied to

  • device (str, optional) – Device to evaluate stencil on, “cpu” or “gpu”

Returns:

stencil – Cached stencil function with waves prefactor, on specified device

Return type:

Callable

exception abtem.finite_difference.NotConvergedError(...)[source]#

Bases: Exception

abtem.finite_difference.conventional_operator(...)[source]#

Split-step real-space multislice operator used in all higher-order expansions.

Parameters:
  • waves (Waves) – Waves object to apply multislice operator on

  • laplace (Callable) – Fast laplace operator stencil function

  • transmission_function (ndarray,) – Scaled potential slice to multiply incoming waves with

  • wavelength (float) – Waves wavelength

abtem.finite_difference.fd_coefficients#

None

abtem.finite_difference.finite_difference_coefficients(...)[source]#
abtem.finite_difference.full_series(...)[source]#

Full Taylor series expansion of the MS Eq.(14) in Ultramicrscopy 134 (2013) 135-143. override_prefactor used in backscatter call, Eq. (13) in Micron 190 (2025) 103778.

abtem.finite_difference.multislice_step(...) Waves | Sequence[Waves][source]#

Performs a single multislice step.

Parameters:
  • waves (Waves) – Waves object to apply multislice operator on

  • potential_slice (PotentialArray) – PotentialArray of slice to be used in transmission operator

  • next_slice (PotentialArray | None) – PotentialArray of next slice (used to ‘look ahead’ for backscattered waves)

  • laplace (Callable) – Fast laplace operator stencil function

  • tolerance (float) – Convergence tolerance for exponent Taylor series amplitude

  • max_terms (int) – Maximum terms in exponent Taylor series

  • order (int) – Multislice operator expansion order

  • fully_corrected (bool) – If True, transmission and propagator operators are expanded to specified order. If next_slice is not None, the backscattered wave component is also computed.

abtem.finite_difference.propagator_taylor_series(...)[source]#

Taylor series expansion of the propagator term in the MS equation. Eq.(8) in Ultramicroscopy 134 (2013) 135-143.