.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/vectors/glass_symmetry.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_vectors_glass_symmetry.py: =========================== Glass Symmetry from Vectors =========================== This example shows how to identify symmetry (in a glassy system but this could be useful other places) by looking at the angles between 3 vectors in the diffraction pattern at some radial ring in k to identify groups of 3 vectors that are subtended by the same angle. This is a very simple example with more detailed examples to come. .. GENERATED FROM PYTHON SOURCE LINES 12-18 .. code-block:: Python import pyxem as pxm from scipy.ndimage import gaussian_filter import matplotlib.pyplot as plt import numpy as np .. GENERATED FROM PYTHON SOURCE LINES 19-20 First we load the data and do some basic processing .. GENERATED FROM PYTHON SOURCE LINES 20-29 .. code-block:: Python s = pxm.data.pdnip_glass(allow_download=True) s.axes_manager.signal_axes[0].offset = -23.7 s.axes_manager.signal_axes[1].offset = -19.3 s.filter(gaussian_filter, sigma=(1, 1, 0, 0), inplace=True) # only in real space s.template_match_disk(disk_r=5, subtract_min=False, inplace=True) vectors = s.get_diffraction_vectors(threshold_abs=0.5, min_distance=3) .. rst-class:: sphx-glr-script-out .. code-block:: none 0%| | 0/17 [00:00` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: glass_symmetry.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: glass_symmetry.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_