calculate_ed_data#
- DiffractionGenerator.calculate_ed_data(structure, reciprocal_radius, rotation=(0, 0, 0), with_direct_beam=True, max_excitation_error=0.01, shape_factor_width=None, debye_waller_factors={})[source]#
Calculates the Electron Diffraction data for a structure.
- Parameters:
- structure
diffpy.structure.structure.Structure The structure for which to derive the diffraction pattern. Note that the structure must be rotated to the appropriate orientation and that testing is conducted on unit cells (rather than supercells).
- reciprocal_radius
float The maximum radius of the sphere of reciprocal space to sample, in reciprocal Angstroms.
- rotation
tuple Euler angles, in degrees, in the rzxz convention. Default is (0, 0, 0) which aligns ‘z’ with the electron beam.
- with_direct_beambool
If True, the direct beam is included in the simulated diffraction pattern. If False, it is not.
- max_excitation_error
float The cut-off for geometric excitation error in the z-direction in units of reciprocal Angstroms. Spots with a larger distance from the Ewald sphere are removed from the pattern. Related to the extinction distance and roungly equal to 1/thickness.
- shape_factor_width
float Determines the width of the reciprocal rel-rod, for fine-grained control. If not set will be set equal to max_excitation_error.
- debye_waller_factors
dictofstr:valuepairs Maps element names to their temperature-dependent Debye-Waller factors.
- structure
- Returns:
diffsims.sims.diffraction_simulation.DiffractionSimulationThe data associated with this structure and diffraction setup.