abtem.integrals#
Module to describe projection integrals of radial potential parametrizations.
Module Contents#
Classes#
Base class for projection integrator object used for calculating projection integrals of radial potentials. |
|
|
|
A ProjectionIntegrator calculating finite projections of radial potential parametrizations. An integral table for each used to evaluate the projection integrals for each atom in a slice given p integral limits. The projected potential evaluated along the |
|
Projection integration plan for calculating finite projection integrals based on Gaussian quadrature rule. |
|
A FieldIntegrator calculating infinite projections of radial potential parametrizations. The hybrid real and reciprocal space method by Wouter Van den Broek et al. is used. |
Functions#
Calculate the point where a function becomes lower than a given tolerance within a given bracketing interval. |
|
Returns an array representing a 2D sinc function centered at [0, 0]. The result is used to compensate for the finite size of single pixels used for representing delta functions. |
|
Add superposition of delta functions at given positions to a 2D array. |
API#
- class abtem.integrals.FieldIntegrator(...)[source]#
Bases:
abtem.core.utils.EqualityMixin,abtem.core.utils.CopyMixinBase class for projection integrator object used for calculating projection integrals of radial potentials.
- Parameters:
Initialization
- property finite: bool#
True indicates that the created projection integrators are implemented only for infinite potential projections.
- abstract integrate_on_grid(...) ndarray[source]#
Integrate radial potential between two limits at the given 2D positions on a grid. The integration limits are only used when the integration method is finite.
- Parameters:
positions (ndarray) – 2D array of xy-positions of the centers of each radial function [Å].
a (ndarray) – Lower integration limit of the pr ojection integrals along z for each position [Å]. The limit is given relative to the center of the radial function.
b (ndarray) – Upper integration limit of the projection integrals along z for each position [Å]. The limit is given relative to the center of the radial function.
gpts (two int) – Number of grid points in x and y describing each slice of the potential.
sampling (two float) – Sampling of the potential in x and y [1 / Å].
device (str, optional) – The device used for calculating the potential, ‘cpu’ or ‘gpu’. The default is determined by the user configuration file.
- class abtem.integrals.GaussianProjectionIntegrals(...)[source]#
Bases:
abtem.integrals.FieldIntegrator- Parameters:
parametrization (str or Parametrization, optional) – The correction radial potential parametrization to integrate. Used for correcting the dependence of the potential close to the nuclear core. Default is the Lobato parametrization.
gaussian_parametrization (str or Parametrization, optional) – The Gaussian radial potential parametrization to integrate. Must be parametrization described by a superposition of Gaussians. Default is the Peng parametrization.
cutoff_tolerance (float, optional) – The error tolerance used for deciding the radial cutoff distance of the potential [eV / e]. Default is 1e-3.
Initialization
- property correction_parametrization#
- property cutoff_tolerance#
The error tolerance used for deciding the radial cutoff distance of the potential [eV / e].
- property gaussian_parametrization#
The error tolerance used for deciding the radial cutoff distance of the potential [eV / e].
- class abtem.integrals.ProjectionIntegralTable(...)[source]#
A ProjectionIntegrator calculating finite projections of radial potential parametrizations. An integral table for each used to evaluate the projection integrals for each atom in a slice given p integral limits. The projected potential evaluated along the
- Parameters:
radial_gpts (array) – The points along a radial in the xy-plane where the projection integrals of the integral table are evaluated.
limits (array) – The points along the projection direction where the projection integrals are evaluated.
Initialization
- class abtem.integrals.QuadratureProjectionIntegrals(...)[source]#
Bases:
abtem.integrals.FieldIntegratorProjection integration plan for calculating finite projection integrals based on Gaussian quadrature rule.
- Parameters:
parametrization (str or Parametrization, optional) – The potential parametrization describing the radial dependence of the potential. Default is ‘lobato’.
cutoff_tolerance (float, optional) – The error tolerance used for deciding the radial cutoff distance of the potential [eV / e]. Default is 1e-3.
taper (float, optional) – The fraction from the cutoff of the radial distance from the core where the atomic potential starts tapering to zero. Default is 0.85.
integration_step (float, optional) – The step size between integration limits used for calculating the integral table. Default is 0.02.
quad_order (int, optional) – Order of quadrature integration passed to scipy.integrate.fixed_quad. Default is 8.
Initialization
- property cutoff_tolerance: float#
The error tolerance used for deciding the radial cutoff distance of the potential [eV / e].
- get_integral_table(...)[source]#
Build table of projection integrals of the radial atomic potential.
- property integration_step: float#
The step size between integration limits used for calculating the integral table.
- property parametrization#
The potential parametrization describing the radial dependence of the potential.
- property quad_order#
Order of quadrature integration.
- property tables#
- class abtem.integrals.ScatteringFactorProjectionIntegrals(...)[source]#
Bases:
abtem.integrals.FieldIntegratorA FieldIntegrator calculating infinite projections of radial potential parametrizations. The hybrid real and reciprocal space method by Wouter Van den Broek et al. is used.
- Parameters:
parametrization (str or Parametrization, optional) – The radial potential parametrization to integrate. Default is the Lobato parametrization.
References
W. Van den Broek et al. Ultramicroscopy, 158:89-97, 2015. doi:10.1016/j.ultramic.2015.07.005.
Initialization
- property parametrization: Parametrization#
- abtem.integrals.optimize_cutoff(...) float[source]#
Calculate the point where a function becomes lower than a given tolerance within a given bracketing interval.
- abtem.integrals.sinc(...) ndarray[source]#
Returns an array representing a 2D sinc function centered at [0, 0]. The result is used to compensate for the finite size of single pixels used for representing delta functions.
- Parameters:
gpts (two int) – Number of grid points in the first and second dimension to evaluate the sinc over.
sampling (two float) – Size of the pixels of the grid determining the scale of the sinc.
device (str) – The array is created on this device (‘cpu’ or ‘gpu’).
- Returns:
sinc – 2D sinc function.
- Return type:
- abtem.integrals.superpose_deltas(...) ndarray[source]#
Add superposition of delta functions at given positions to a 2D array.
- Parameters:
positions (ndarray) – Array of 2D positions as an nx2 array. The positions are given in units of pixels.
array (ndarray) – The delta functions are added to this 2D array.
weights (ndarray, optional) – If given each delta function is weighted by the given factor. Must match the length of positions.
round_positions (bool, optional) – If True, the delta function positions are rounded to the center of the nearest pixel, otherwise subpixel precision is used.
- Returns:
array – The array with the delta functions added.
- Return type: