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:
structurediffpy.structure.structure.Structure

The structure to be simulated.

simulatorDiffractionGenerator

The simulator used to generate the simulations

systemstr

‘cubic’, ‘hexagonal’, ‘trigonal’, ‘tetragonal’, ‘orthorhombic’, ‘monoclinic’. Defaults to ‘cubic’.

reciprocal_radiusfloat

The range of reciprocal lattice spots to be included. Default to 1.

densitystr

‘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_dictionarydict

Keys are zone axes, values are simulations

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)