.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/pattern_processing/static_background_correction.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_pattern_processing_static_background_correction.py: ============================ Static background correction ============================ This example shows how to remove the static background of an EBSD pattern using :meth:`~kikuchipy.signals.EBSD.remove_static_background`. More details are given in the :doc:`pattern processing tutorial `. .. GENERATED FROM PYTHON SOURCE LINES 32-33 Imports. .. GENERATED FROM PYTHON SOURCE LINES 33-37 .. code-block:: Python import matplotlib.pyplot as plt import kikuchipy as kp .. GENERATED FROM PYTHON SOURCE LINES 38-40 Load low resolution Ni patterns and check that the background pattern is stored with the signal. .. GENERATED FROM PYTHON SOURCE LINES 40-45 .. code-block:: Python s = kp.data.nickel_ebsd_small() print(s.static_background) s2 = s.remove_static_background(inplace=False) .. rst-class:: sphx-glr-script-out .. code-block:: none [[84 87 90 ... 27 29 30] [87 90 93 ... 27 28 30] [92 94 97 ... 39 28 29] ... [80 82 84 ... 36 30 26] [79 80 82 ... 28 26 26] [76 78 80 ... 26 26 25]] 0%| | 0/2 [00:00` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: static_background_correction.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: static_background_correction.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_