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_librarydifffsims:StructureLibrary Object

Dictionary of structures and associated orientations for which electron diffraction is to be simulated.

calibrationfloat

The calibration of experimental data to be correlated with the library, in reciprocal Angstroms per pixel.

reciprocal_radiusfloat

The maximum g-vector magnitude to be included in the simulations.

half_shapetuple

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

with_direct_beambool

Include the direct beam in the library.

max_excitation_errorfloat

The extinction distance for reflections, in reciprocal Angstroms.

shape_factor_widthfloat

Determines the width of the shape functions of the reflections in Angstroms. If not set is equal to max_excitation_error.

debye_waller_factorsdict of str:value pairs

Maps element names to their temperature-dependent Debye-Waller factors.

Returns:
diffraction_libraryDiffractionLibrary

Mapping of crystal structure and orientation to diffraction data objects.

Examples using DiffractionLibraryGenerator.get_diffraction_library#

0.5.x –> 0.6.x Migration Guide

0.5.x --> 0.6.x Migration Guide