validate_sigmas#
- abtem.inelastic.phonons.validate_sigmas(atoms, sigmas, return_array=False)[source]#
Validate the standard deviations of displacement for atoms in an atomic structure.
- Parameters:
atoms (Atoms) – The atomic structure which standard deviations of displacement are to be validated.
sigmas (float, dict[str, float] or Sequence[float]) –
It can be either:
a single float value specifying the standard deviation for all atoms,
a dictionary mapping each atom’s symbol or atomic number to a corresponding standard deviation,
a sequence of float values providing the standard deviation for each atom individually.
For anisotropic displacements, either three values for each atom or for each element must be provided.
- Return type:
tuple[Union[ndarray,dict[str,ndarray]],bool]- Returns:
sigmas (dict[str, float] or np.ndarray) – The validated standard deviations
anisotropic (bool) – A boolean value indicating whether the displacements are anisotropic.
- Raises:
ValueError – If the type of sigmas is not float, dict, or list.
RuntimeError – If the length of sigmas does not match the length of atoms, or three values for each atom or each element are not given for anisotropic displacements.