calculate_diffraction2d#
- SimulationGenerator.calculate_diffraction2d(phase: Phase | Sequence[Phase], rotation: Rotation | Sequence[Rotation] = Rotation(1)[[1. - 0. - 0. - 0.]], reciprocal_radius: float = 1.0, with_direct_beam: bool = True, max_excitation_error: float = 0.01, shape_factor_width: float = None, debye_waller_factors: dict = None, show_progressbar: bool = False)[source]#
Calculates the diffraction pattern for one or more phases given a list of rotations for each phase.
- Parameters:
- phase:
The phase(s) for which to derive the diffraction pattern.
- reciprocal_radius
The maximum radius of the sphere of reciprocal space to sample, in reciprocal Angstroms.
- rotation
The Rotation object(s) to apply to the structure and then calculate the diffraction pattern.
- with_direct_beam
If True, the direct beam is included in the simulated diffraction pattern. If False, it is not.
- max_excitation_error
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 roughly equal to 1/thickness.
- shape_factor_width
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
Maps element names to their temperature-dependent Debye-Waller factors.
- show_progressbar
If True, display a progressbar. Defaults to False
- Returns:
diffsims.sims.diffraction_simulation.DiffractionSimulationThe data associated with this structure and diffraction setup.