.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/orientation_mapping/multi_phase_orientation.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_orientation_mapping_multi_phase_orientation.py: Multi Phase Orientation Mapping =============================== You can also calculate the orientation of the grains for multiple phases using the :meth:`pyxem.signals.PolarSignal2D.get_orientation` method. This requires that you simulate the entire S2 space for the phase and then compare to the simulated diffraction. For more information on the orientation mapping process see :cite:`pyxemorientationmapping2022` .. GENERATED FROM PYTHON SOURCE LINES 10-20 .. code-block:: Python import pyxem as pxm from pyxem.data import fe_multi_phase_grains, fe_bcc_phase, fe_fcc_phase from diffsims.generators.simulation_generator import SimulationGenerator from orix.quaternion import Rotation from orix.sampling import get_sample_reduced_fundamental import hyperspy.api as hs multi_phase = fe_multi_phase_grains() .. GENERATED FROM PYTHON SOURCE LINES 21-26 First we center the diffraction patterns and get a polar signal Increasing the number of npt_azim with give better polar sampling but will take longer to compute the orientation map The mean=True argument will return the mean pixel value in each bin rather than the sum this makes the high k values more visible .. GENERATED FROM PYTHON SOURCE LINES 26-33 .. code-block:: Python multi_phase.calibration.center = None polar_multi = multi_phase.get_azimuthal_integral2d( npt=100, npt_azim=360, inplace=False, mean=True ) polar_multi.plot() .. rst-class:: sphx-glr-horizontal * .. image-sg:: /examples/orientation_mapping/images/sphx_glr_multi_phase_orientation_001.png :alt: multi phase orientation :srcset: /examples/orientation_mapping/images/sphx_glr_multi_phase_orientation_001.png :class: sphx-glr-multi-img * .. image-sg:: /examples/orientation_mapping/images/sphx_glr_multi_phase_orientation_002.png :alt: Signal :srcset: /examples/orientation_mapping/images/sphx_glr_multi_phase_orientation_002.png :class: sphx-glr-multi-img .. 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: multi_phase_orientation.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: multi_phase_orientation.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_