generate_zap_map#
- diffsims.generators.zap_map_generator.generate_zap_map(structure, simulator, system='cubic', reciprocal_radius=1, density='7', **kwargs)[source]#
Produces a number of zone axis patterns for a structure
- Parameters:
structure (diffpy.structure.structure.Structure) – The structure to be simulated.
simulator (DiffractionGenerator) – The simulator used to generate the simulations
system (str) – ‘cubic’, ‘hexagonal’, ‘trigonal’, ‘tetragonal’, ‘orthorhombic’, ‘monoclinic’. Defaults to ‘cubic’.
reciprocal_radius (float) – The range of reciprocal lattice spots to be included. Default to 1.
density (str) – ‘3’ for the corners or ‘7’ (corners + midpoints + centroids). Defaults to 7.
kwargs – Keyword arguments to be passed to simulator.calculate_ed_data().
- Returns:
zap_dictionary – Keys are zone axes, values are simulations
- Return type:
Examples
Plot all of the patterns that you have generated
>>> zap_map = generate_zap_map(structure,simulator,'hexagonal',density='3') >>> for k in zap_map.keys(): >>> pattern = zap_map[k] >>> pattern.calibration = 4e-3 >>> plt.figure() >>> plt.imshow(pattern.get_diffraction_pattern(),vmax=0.02)