.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/EELS/fourier_ratio_deconvolution.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_auto_examples_EELS_fourier_ratio_deconvolution.py: Fourier ratio deconvolution =========================== This example demonstrates how to perform Fourier ratio deconvolution on Mn L\ :sub:`2,3` core-loss edge. .. GENERATED FROM PYTHON SOURCE LINES 8-11 .. code-block:: Python import hyperspy.api as hs .. GENERATED FROM PYTHON SOURCE LINES 12-14 Load a core-loss and low-loss EELS spectra and align the zero-loss peak. The core-loss spectrum contains the O K edge at 532 eV and the Mn L\ :sub:`2,3` edgeat 640 eV. .. GENERATED FROM PYTHON SOURCE LINES 14-22 .. code-block:: Python low_loss = hs.load("../lowloss_spectrum.msa", signal_type="EELS") core_loss = hs.load("../coreloss_spectrum.msa", signal_type="EELS") low_loss.align_zero_loss_peak(also_align=core_loss) hs.plot.plot_spectra([low_loss, core_loss], legend=["Low-loss", "Core-loss"]) .. image-sg:: /auto_examples/EELS/images/sphx_glr_fourier_ratio_deconvolution_001.png :alt: fourier ratio deconvolution :srcset: /auto_examples/EELS/images/sphx_glr_fourier_ratio_deconvolution_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Initial ZLP position statistics ------------------------------- Summary statistics ------------------ mean: 0.8 std: 0 min: 0.8 Q1: 0.8 median: 0.8 Q3: 0.8 max: 0.8 .. GENERATED FROM PYTHON SOURCE LINES 23-24 Remove the background from the Mn L\ :sub:`2,3` edge. .. GENERATED FROM PYTHON SOURCE LINES 24-27 .. code-block:: Python Mn_edge = core_loss.remove_background([600.0, 638.0]).isig[600.0:] Mn_edge.plot() .. image-sg:: /auto_examples/EELS/images/sphx_glr_fourier_ratio_deconvolution_002.png :alt: Signal :srcset: /auto_examples/EELS/images/sphx_glr_fourier_ratio_deconvolution_002.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 28-29 Then perform Fourier ratio deconvolution using the low-loss spectrum as the reference. .. GENERATED FROM PYTHON SOURCE LINES 29-31 .. code-block:: Python Mn_edge_deconv = Mn_edge.fourier_ratio_deconvolution(low_loss=low_loss) .. rst-class:: sphx-glr-script-out .. code-block:: none 0%| | 0/2 [00:00 .. GENERATED FROM PYTHON SOURCE LINES 38-39 sphinx_gallery_thumbnail_number = 3 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.049 seconds) .. _sphx_glr_download_auto_examples_EELS_fourier_ratio_deconvolution.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: fourier_ratio_deconvolution.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: fourier_ratio_deconvolution.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: fourier_ratio_deconvolution.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_