get_diffraction_library#

DiffractionLibraryGenerator.get_diffraction_library(structure_library, calibration, reciprocal_radius, half_shape, with_direct_beam=True, max_excitation_error=0.01, shape_factor_width=None, debye_waller_factors={})[source]#

Calculates a dictionary of diffraction data for a library of crystal structures and orientations.

Each structure in the structure library is rotated to each associated orientation and the diffraction pattern is calculated each time.

Angles must be in the Euler representation (Z,X,Z) and in degrees

Parameters:
  • structure_library (difffsims:StructureLibrary Object) – Dictionary of structures and associated orientations for which electron diffraction is to be simulated.

  • calibration (float) – The calibration of experimental data to be correlated with the library, in reciprocal Angstroms per pixel.

  • reciprocal_radius (float) – The maximum g-vector magnitude to be included in the simulations.

  • half_shape (tuple) – The half shape of the target patterns, for 144x144 use (72,72) etc

  • with_direct_beam (bool) – Include the direct beam in the library.

  • max_excitation_error (float) – The extinction distance for reflections, in reciprocal Angstroms.

  • shape_factor_width (float) – Determines the width of the shape functions of the reflections in Angstroms. If not set is equal to max_excitation_error.

  • debye_waller_factors (dict of str:value pairs) – Maps element names to their temperature-dependent Debye-Waller factors.

Returns:

diffraction_library – Mapping of crystal structure and orientation to diffraction data objects.

Return type:

DiffractionLibrary