.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/EDS/find_EDS_lines.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_EDS_find_EDS_lines.py: Find EDS lines ============== This example demonstrates how to find EDS lines. .. GENERATED FROM PYTHON SOURCE LINES 8-11 .. code-block:: Python import exspy .. GENERATED FROM PYTHON SOURCE LINES 12-13 Show the X-ray lines near 6.4 keV: .. GENERATED FROM PYTHON SOURCE LINES 13-15 .. code-block:: Python exspy.utils.eds.print_lines_near_energy(energy=6.4) .. rst-class:: sphx-glr-script-out .. code-block:: none +---------+------+--------------+--------+------------+ | Element | Line | Energy (keV) | Weight | Intensity | +---------+------+--------------+--------+------------+ | Sm | Lb3 | 6.32 | 0.13 | # | | Pm | Lb2 | 6.34 | 0.20 | # | | Fe | Ka | 6.40 | 1.00 | ########## | | Eu | Lb1 | 6.46 | 0.44 | #### | | Mn | Kb | 6.49 | 0.13 | # | | Dy | La | 6.50 | 1.00 | ########## | +---------+------+--------------+--------+------------+ .. GENERATED FROM PYTHON SOURCE LINES 16-17 Show the main (high weight) X-ray lines near 6.4 keV: .. GENERATED FROM PYTHON SOURCE LINES 17-20 .. code-block:: Python exspy.utils.eds.print_lines_near_energy(energy=6.4, weight_threshold=0.5) .. rst-class:: sphx-glr-script-out .. code-block:: none +---------+------+--------------+--------+------------+ | Element | Line | Energy (keV) | Weight | Intensity | +---------+------+--------------+--------+------------+ | Fe | Ka | 6.40 | 1.00 | ########## | | Dy | La | 6.50 | 1.00 | ########## | +---------+------+--------------+--------+------------+ .. GENERATED FROM PYTHON SOURCE LINES 21-22 Show all X-ray lines for a given element .. GENERATED FROM PYTHON SOURCE LINES 22-25 .. code-block:: Python exspy.utils.eds.print_lines(elements=["Fe"]) .. rst-class:: sphx-glr-script-out .. code-block:: none +---------+------+--------------+--------+------------+ | Element | Line | Energy (keV) | Weight | Intensity | +---------+------+--------------+--------+------------+ | Fe | Ka | 6.40 | 1.00 | ########## | | | Kb | 7.06 | 0.13 | # | | | La | 0.70 | 1.00 | ########## | | | Ll | 0.62 | 0.31 | ### | | | Ln | 0.63 | 0.13 | # | +---------+------+--------------+--------+------------+ .. GENERATED FROM PYTHON SOURCE LINES 26-27 Show all X-ray lines for multiple elements .. GENERATED FROM PYTHON SOURCE LINES 27-29 .. code-block:: Python exspy.utils.eds.print_lines(elements=["Fe", "Pt"]) .. rst-class:: sphx-glr-script-out .. code-block:: none +---------+------+--------------+--------+------------+ | Element | Line | Energy (keV) | Weight | Intensity | +---------+------+--------------+--------+------------+ | Fe | Ka | 6.40 | 1.00 | ########## | | | Kb | 7.06 | 0.13 | # | | | La | 0.70 | 1.00 | ########## | | | Ll | 0.62 | 0.31 | ### | | | Ln | 0.63 | 0.13 | # | +---------+------+--------------+--------+------------+ | Pt | Ka | 66.83 | 1.00 | ########## | | | Kb | 75.75 | 0.15 | # | | | La | 9.44 | 1.00 | ########## | | | Lb1 | 11.07 | 0.41 | #### | | | Lb2 | 11.25 | 0.22 | ## | | | Ma | 2.05 | 1.00 | ########## | | | Mb | 2.13 | 0.59 | ##### | +---------+------+--------------+--------+------------+ .. GENERATED FROM PYTHON SOURCE LINES 30-31 Show all X-ray lines from a signal of the elements defined in the metadata .. GENERATED FROM PYTHON SOURCE LINES 31-36 .. code-block:: Python s = exspy.data.EDS_TEM_FePt_nanoparticles() s.plot(xray_lines=True) s.print_lines() .. image-sg:: /auto_examples/EDS/images/sphx_glr_find_EDS_lines_001.png :alt: EDS TEM Spectrum Signal :srcset: /auto_examples/EDS/images/sphx_glr_find_EDS_lines_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none +---------+------+--------------+--------+------------+ | Element | Line | Energy (keV) | Weight | Intensity | +---------+------+--------------+--------+------------+ | Fe | Ka | 6.40 | 1.00 | ########## | | | Kb | 7.06 | 0.13 | # | | | La | 0.70 | 1.00 | ########## | | | Ll | 0.62 | 0.31 | ### | | | Ln | 0.63 | 0.13 | # | +---------+------+--------------+--------+------------+ | Pt | Ka | 66.83 | 1.00 | ########## | | | Kb | 75.75 | 0.15 | # | | | La | 9.44 | 1.00 | ########## | | | Lb1 | 11.07 | 0.41 | #### | | | Lb2 | 11.25 | 0.22 | ## | | | Ma | 2.05 | 1.00 | ########## | | | Mb | 2.13 | 0.59 | ##### | +---------+------+--------------+--------+------------+ .. GENERATED FROM PYTHON SOURCE LINES 37-39 Display the X-ray lines close to 8 keV, which corresponds to the Cu Kα line coming from the TEM grid .. GENERATED FROM PYTHON SOURCE LINES 39-41 .. code-block:: Python s.print_lines_near_energy(8.0) .. rst-class:: sphx-glr-script-out .. code-block:: none +---------+------+--------------+--------+------------+ | Element | Line | Energy (keV) | Weight | Intensity | +---------+------+--------------+--------+------------+ | Ho | Lb2 | 7.91 | 0.24 | ## | | Er | Lb3 | 7.94 | 0.13 | # | | Cu | Ka | 8.05 | 1.00 | ########## | +---------+------+--------------+--------+------------+ .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.461 seconds) .. _sphx_glr_download_auto_examples_EDS_find_EDS_lines.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: find_EDS_lines.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: find_EDS_lines.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: find_EDS_lines.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_