abtem.parametrizations#
Module for describing analytical potential parametrizations.
Subpackages#
Package Contents#
Classes#
Potential parametrization by Earl J Kirkland. |
|
Potential parametrization by Ivan Lobato and Dirk Van Dyck. |
|
Base class for potential parametrizations. |
|
Potential parametrization by Lian-Mao Peng. |
Functions#
API#
- class abtem.parametrizations.EwaldParametrization(...)[source]#
Bases:
abtem.parametrizations.Parametrization- property width#
- class abtem.parametrizations.KirklandParametrization(...)[source]#
Bases:
abtem.parametrizations.ParametrizationPotential parametrization by Earl J Kirkland.
- Parameters:
parameters (str or dict) – A given string must be either the full path to a valid
.jsonfile or the name of a valid.jsonfile in theabtem/parametrizations/data/folder. A given dictionary must be a mapping from chemical symbols to anything that can converted to a NumPy array of shape (4, 3).sigmas (dict or float) – The standard deviation of isotropic displacements for each element as a mapping from chemical symbols to a number. If given as a float the standard deviation of the displacements is assumed to be identical for all atoms.
References
E.J. Kirkland. Advanced computing in electron microscopy. Springer, 2. edition, 2010
Initialization
- class abtem.parametrizations.LobatoParametrization(...)[source]#
Bases:
abtem.parametrizations.ParametrizationPotential parametrization by Ivan Lobato and Dirk Van Dyck.
- Parameters:
parameters (str or dict) – A given string must be either the full path to a valid
.jsonfile or the name of a valid.jsonfile in theabtem/parametrizations/data/folder. A given dictionary must be a mapping from chemical symbols to anything that can converted to a NumPy array of shape (2, 5).sigmas (dict or float) – The standard deviation of isotropic displacements for each element as a mapping from chemical symbols to a number. If given as a float the standard deviation of the displacements is assumed to be identical for all atoms.
References
Ivan Lobato and Dirk Van Dyck. Acta Crystallographica Section A, 70:636-649, 2014.
Initialization
- fit(...)[source]#
Fit the scattering factor functional form to data.
- Parameters:
Z (int) – Atomic number the fit is stored under.
k (ndarray) – Sample points in reciprocal space [1/Å].
f (ndarray) – Scattering factor values at k.
guess (ndarray, optional) – Initial parameter guess. Defaults to this element’s own tabulated parameters if already present, else the reference lobato.json values.
regularization (float, optional) – Weight of an L2 penalty pulling the fit towards guess. The 10-parameter functional form has near-degenerate parameter directions – pairs of large, nearly-cancelling terms that barely affect the fitted curve in k-space but can shift the reconstructed real-space potential substantially near r = 0. An unregularized fit (the default, 0.0) is appropriate when f is essentially exact (e.g. refitting tabulated values through the same functional form); a small positive value (e.g. 0.05) stabilizes those directions when f carries its own numerical noise (e.g. from GPAWParametrization), at the cost of biasing the fit towards guess.
- class abtem.parametrizations.Parametrization(...)[source]#
Bases:
abtem.core.utils.EqualityMixinBase class for potential parametrizations.
- Parameters:
parameters (str or dict) – A given string must be either the full path to a valid
.jsonfile or the name of a valid.jsonfile in theabtem/parametrizations/data/folder. A given dictionary must be a mapping from chemical symbols to anything that can converted to a NumPy array with the correct shape for the given parametrization.sigmas (dict or float) – The standard deviation of isotropic displacements for each element as a mapping from chemical symbols to a number. If given as a float the standard deviation of the displacements is assumed to be identical for all atoms.
Initialization
- finite_projected_potential(...) callable[source]#
X-ray scattering factor for given chemical symbol and charge.
- finite_projected_scattering_factor(...) callable[source]#
Analytical infinite projection of radial scattering factor for given chemical symbol and charge.
- get_function(...) callable[source]#
Returns the line profiles for a parameterized function for one or more element.
- line_profiles(...) RealSpaceLineProfiles | ReciprocalSpaceLineProfiles[source]#
Returns the line profiles for a parameterized function for one or more element.
- Parameters:
symbol (str or list of str) – Chemical symbol(s) of atom(s).
cutoff (float) – The outer radial cutoff distance of the line profiles in units of Ångstrom for potentials and units of reciprocal Ångstrom for scattering factors.
sampling (float, optional) – The radial sampling of the line profiles in units of Ångstrom for potentials and units of reciprocal Ångstrom for scattering factors. Default is 0.001.
name (str) – Name of the line profile to return.
- potential(...) callable[source]#
Radial electrostatic potential for given chemical symbol and charge.
- projected_potential(...) Callable[source]#
Analytical infinite projection of radial electrostatic potential for given chemical symbol and charge.
- projected_scattering_factor(...) callable[source]#
Analytical infinite projection of radial scattering factor for given chemical symbol and charge.
- abstract scaled_parameters(...) ndarray[source]#
The parameters of the parametrization scaled to the abTEM units for a given function.
- scattering_factor(...) Callable[source]#
Radial scattering factor for given chemical symbol and charge.
- property sigmas#
The standard deviation of isotropic displacements.
- class abtem.parametrizations.PengParametrization(...)[source]#
Bases:
abtem.parametrizations.ParametrizationPotential parametrization by Lian-Mao Peng.
- Parameters:
parameters (str or dict) – A given string must be either the full path to a valid
.jsonfile or the name of a valid.jsonfile in theabtem/parametrizations/data/folder. A given dictionary must be a mapping from chemical symbols to anything that can converted to a NumPy array of shape (2, 5).sigmas (dict or float) – The standard deviation of isotropic displacements for each element as a mapping from chemical symbols to a number. If given as a float the standard deviation of the displacements is assumed to be identical for all atoms.
References
Peng, L. Micron, 30(6):625–648, 1999.
Initialization
- abtem.parametrizations.validate_parametrization(...) Parametrization[source]#