diff --git a/doc/conf.py b/doc/conf.py index be78d02e9..26879e545 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -44,6 +44,7 @@ "sphinx_copybutton", "sphinx.ext.autodoc", "sphinx.ext.autosummary", + "sphinx.ext.doctest", "sphinx.ext.githubpages", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", diff --git a/doc/user_guide/eds.rst b/doc/user_guide/eds.rst index eee7ce488..d10688e65 100644 --- a/doc/user_guide/eds.rst +++ b/doc/user_guide/eds.rst @@ -38,7 +38,8 @@ Loading data All data are loaded with the :py:func:`hyperspy.api.load` function, as described in detail in the :external+hyperspy:ref:`loading files` of the HyperSpy documentation. HyperSpy is able to import different formats, among them -``msa`` and ``rpl`` (the raw format of Oxford Instruments and Bruker). +:external+rsciio:ref:`msa ` and :external+rsciio:ref:`rpl ` +(the raw format of Oxford Instruments and Bruker). Here are three examples of files exported by Oxford Instruments software (INCA). For a single spectrum: @@ -59,7 +60,7 @@ dimensional signal with the energy axis in first position): >>> si -Finally, for a stack of spectrum images, using "*" as a wildcard character: +Finally, for a stack of spectrum images, using ``"*"`` as a wildcard character: .. code-block:: python @@ -138,7 +139,7 @@ or through the GUI: .. figure:: images/EDS_microscope_parameters_gui.png :align: center - :width: 350 + :width: 300 EDS microscope parameters preferences window @@ -159,7 +160,7 @@ or through the GUI: .. figure:: images/EDS_preferences_gui.png :align: center - :width: 400 + :width: 300 EDS preferences window @@ -231,19 +232,15 @@ The description of the sample is also stored in the ├── thickness = 100 └── xray_lines = ['Fe_Ka', 'Pt_La'] - -The following methods are either called "set" or "add". - -* "set" methods overwrite previously defined values -* "add" methods add to the previously defined values - Elements ^^^^^^^^ -The elements present in the sample can be defined using the -:py:meth:`~.signals.EDSSpectrum.set_elements` and -:py:meth:`~.signals.EDSSpectrum.add_elements` methods. Only element -abbreviations are accepted: +The elements present in the sample can be defined using two methods: + +- :py:meth:`~.signals.EDSSpectrum.set_elements` to overwrite previously defined elements +- :py:meth:`~.signals.EDSSpectrum.add_elements` to add to the previously defined elements + +Only element abbreviations are accepted: .. code-block:: python @@ -256,11 +253,13 @@ abbreviations are accepted: X-ray lines ^^^^^^^^^^^ -Similarly, the X-ray lines can be defined using the -:py:meth:`~.signals.EDSSpectrum.set_lines` and -:py:meth:`~.signals.EDSSpectrum.add_lines` methods. The corresponding -elements will be added automatically. -Several lines per element can be defined at once. +Similarly, the X-ray lines can be defined using: + +- :py:meth:`~.signals.EDSSpectrum.set_lines` to overwrite previously defined values +- :py:meth:`~.signals.EDSSpectrum.add_lines` to add to the previously defined elements + +The corresponding elements will be added automatically. Several lines per +element can be defined at once. .. code-block:: python @@ -278,7 +277,7 @@ overvoltage of 2 (< beam energy / 2)): .. code-block:: python - >>> s = hs.datasets.example_signals.EDS_SEM_Spectrum() + >>> s = exspy.data.EDS_SEM_TM002() >>> s.set_elements(['Al', 'Cu', 'Mn']) >>> s.set_microscope_parameters(beam_energy=30) >>> s.add_lines() @@ -300,7 +299,7 @@ energy: .. code-block:: python - >>> s = hs.datasets.example_signals.EDS_SEM_Spectrum() + >>> s = exspy.data.EDS_SEM_TM002() >>> s.set_elements(['Mn']) >>> s.set_microscope_parameters(beam_energy=5) >>> s.add_lines(['Mn_Ka']) @@ -310,18 +309,18 @@ energy: Elemental database ^^^^^^^^^^^^^^^^^^ -HyperSpy includes an elemental database, which contains the energy of the +`eXSpy` includes an elemental database, which contains the energy of the X-ray lines. .. code-block:: python - >>> hs.material.elements.Fe.General_properties + >>> exspy.material.elements.Fe.General_properties ├── Z = 26 ├── atomic_weight = 55.845 └── name = iron - >>> hs.material.elements.Fe.Physical_properties + >>> exspy.material.elements.Fe.Physical_properties └── density (g/cm^3) = 7.874 - >>> hs.material.elements.Fe.Atomic_properties.Xray_lines + >>> exspy.material.elements.Fe.Atomic_properties.Xray_lines ├── Ka │ ├── energy (keV) = 6.404 │ └── weight = 1.0 @@ -345,14 +344,14 @@ Finding elements from energy ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ To find the nearest X-ray line for a given energy, use the utility function -:py:func:`~.misc.eds.utils.get_xray_lines_near_energy` to search the elemental +:py:func:`~.utils.eds.get_xray_lines_near_energy` to search the elemental database: .. code-block:: python - >>> s = hs.datasets.example_signals.EDS_SEM_Spectrum() + >>> s = exspy.data.EDS_SEM_TM002() >>> P = s.find_peaks1D_ohaver(maxpeakn=1)[0] - >>> hs.eds.get_xray_lines_near_energy(P['position'], only_lines=['a', 'b']) + >>> exspy.utils.eds.get_xray_lines_near_energy(P['position'], only_lines=['a', 'b']) ['C_Ka', 'Ca_La', 'B_Ka'] The lines are returned in order of distance from the specified energy, and can @@ -369,7 +368,7 @@ You can visualize an EDS spectrum using the .. code-block:: python - >>> s = hs.datasets.example_signals.EDS_SEM_Spectrum() + >>> s = exspy.data.EDS_SEM_TM002() >>> s.plot() .. figure:: images/EDS_plot_spectrum.png @@ -389,13 +388,13 @@ Plotting X-ray lines X-ray lines can be added as plot labels with :py:meth:`~.signals.EDSSpectrum.plot`. The lines are either retrieved -from ``metadata.Sample.Xray_lines``, or selected with the same method as -:py:meth:`~.signals.EDSSpectrum.add_lines` using the elements in -``metadata.Sample.elements``. +from :ref:`metadata.Sample.Xray_lines `, or selected +with the same method as :py:meth:`~.signals.EDSSpectrum.add_lines` using +the elements defined in :ref:`metadata.Sample.elements `. .. code-block:: python - >>> s = hs.datasets.example_signals.EDS_SEM_Spectrum() + >>> s = exspy.data.EDS_SEM_TM002() >>> s.add_elements(['C','Mn','Cu','Al','Zr']) >>> s.plot(True) @@ -409,7 +408,7 @@ You can also select a subset of lines to label: .. code-block:: python - >>> s = hs.datasets.example_signals.EDS_SEM_Spectrum() + >>> s = exspy.data.EDS_SEM_TM002() >>> s.add_elements(['C','Mn','Cu','Al','Zr']) >>> s.plot(True, only_lines=['Ka','b']) @@ -451,9 +450,9 @@ Mn Ka to the peak energy (``energy_resolution_MnKa`` in the metadata): :align: center :width: 500 - Iron map as computed and displayed by ``get_lines_intensity`` + Iron map as computed and displayed by :py:meth:`~.signals.EDSSpectrum.get_lines_intensity` -The X-ray lines defined in ``metadata.Sample.Xray_lines`` are used by default. +The X-ray lines defined in :ref:`metadata.Sample.Xray_lines ` are used by default. The EDS maps can be plotted using :py:func:`hyperspy.api.plot.plot_images`, see :external+hyperspy:ref:`plotting several images` for more information in setting plotting parameters. @@ -598,8 +597,8 @@ ranges containing no X-ray lines: >>> m.fit_background() The width of the X-ray lines is defined from the energy resolution (FWHM at -Mn Ka) provided by ``energy_resolution_MnKa`` in ``metadata``. This parameter -can be calibrated by fitting with +Mn Ka) provided by :ref:`metadata.Acquisition_instrument.Detector.EDS.energy_resolution_MnKa `. +This parameter can be calibrated by fitting with :py:meth:`~.models.EDSModel.calibrate_energy_axis`: .. code-block:: python @@ -692,8 +691,8 @@ and :ref:`[Watanabe2006] `. Cross sections should be provided in units of barns (b). Further details on the cross section method can be found in :ref:`[MacArthur2016] `. Conversion between zeta-factors and cross sections is possible using -:py:func:`~.misc.eds.utils.edx_cross_section_to_zeta` or -:py:func:`~.misc.eds.utils.zeta_to_edx_cross_section`. +:py:func:`~.utils.eds.edx_cross_section_to_zeta` or +:py:func:`~.utils.eds.zeta_to_edx_cross_section`. Using the Cliff-Lorimer method as an example, quantification can be carried out as follows: @@ -722,14 +721,14 @@ transformed into weight percent either with the option Fe (Fe_Ka): Composition = 4.96 weight percent Pt (Pt_La): Composition = 95.04 weight percent -or using :py:func:`~.misc.material.atomic_to_weight`: +or using :py:func:`~.material.atomic_to_weight`: .. code-block:: python >>> # With atomic_percent from before - >>> weight_percent = hs.material.atomic_to_weight(atomic_percent) + >>> weight_percent = exspy.material.atomic_to_weight(atomic_percent) -The reverse method is :py:func:`~.misc.material.weight_to_atomic`. +The reverse method is :py:func:`~.material.weight_to_atomic`. The zeta-factor method needs both the ``beam_current`` (in nA) and the acquisition or dwell time (referred to as ``real_time`` in seconds) in order @@ -834,17 +833,18 @@ Mass absorption coefficient database ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A mass absorption coefficient database :ref:`[Chantler2005] ` -is available: +is available can be accessed using :py:meth:`exspy.material.mass_absorption_coefficient` +and :py:meth:`exspy.material.mass_absorption_mixture`: .. code-block:: python - >>> hs.material.mass_absorption_coefficient( + >>> exspy.material.mass_absorption_coefficient( ... element='Al', energies=['C_Ka','Al_Ka']) array([ 26330.38933818, 372.02616732]) .. code-block:: python - >>> hs.material.mass_absorption_mixture( + >>> exspy.material.mass_absorption_mixture( ... elements=['Al','Zn'], weight_percent=[50,50], energies='Al_Ka') 2587.4161643905127 @@ -852,20 +852,20 @@ Electron and X-ray range ^^^^^^^^^^^^^^^^^^^^^^^^ The electron and X-ray range in a bulk material can be estimated with -:py:meth:`hs.eds.electron_range` and :py:meth:`hs.eds.xray_range` +:py:meth:`exspy.utils.eds.electron_range` and :py:meth:`exspy.utils.eds.xray_range` To calculate the X-ray range of Cu Ka in pure Copper at 30 kV in micron: .. code-block:: python - >>> hs.eds.xray_range('Cu_Ka', 30.) + >>> exspy.utils.eds.xray_range('Cu_Ka', 30.) 1.9361716759499248 To calculate the X-ray range of Cu Ka in pure Carbon at 30kV in micron: .. code-block:: python - >>> hs.eds.xray_range('Cu_Ka', 30., hs.material.elements.C. + >>> exspy.utils.eds.xray_range('Cu_Ka', 30., exspy.material.elements.C. ... Physical_properties.density_gcm3) 7.6418811280855454 @@ -873,5 +873,5 @@ To calculate the electron range in pure Copper at 30 kV in micron .. code-block:: python - >>> hs.eds.electron_range('Cu', 30.) + >>> exspy.utils.eds.electron_range('Cu', 30.) 2.8766744984001607 diff --git a/doc/user_guide/eels.rst b/doc/user_guide/eels.rst index fd1066e71..0d34b4810 100644 --- a/doc/user_guide/eels.rst +++ b/doc/user_guide/eels.rst @@ -15,7 +15,7 @@ The functions described in this chapter are only available for the .. code-block:: python - >>> s.set_signal_type("EELS") + >>> s.set_signal_type("EELS") # doctest: +SKIP Note these chapter discusses features that are available only for :py:class:`~.signals.EELSSpectrum` class. However, this class inherits @@ -47,10 +47,9 @@ they are arranged in the order closest to 849 eV. .. code-block:: python - >>> from hyperspy.misc.eels.tools import get_edges_near_energy - >>> get_edges_near_energy(532) + >>> exspy.utils.eels.get_edges_near_energy(532) ['O_K', 'Pd_M3', 'Sb_M5', 'Sb_M4'] - >>> get_edges_near_energy(849, width=6) + >>> exspy.utils.eels.get_edges_near_energy(849, width=6) ['La_M4', 'Fe_L1'] The static method :py:meth:`~.signals.EELSSpectrum.print_edges_near_energy` @@ -59,7 +58,7 @@ more information about the edges. .. code-block:: python - >>> s = hs.datasets.artificial_data.get_core_loss_eels_signal() + >>> s = exspy.data.EELS_MnFe() >>> s.print_edges_near_energy(401, width=20) +-------+-------------------+-----------+-----------------------------+ | edge | onset energy (eV) | relevance | description | @@ -85,7 +84,7 @@ to aid identification of edges. .. code-block:: python - >>> s = hs.datasets.artificial_data.get_core_loss_eels_signal() + >>> s = exspy.data.EELS_MnFe() >>> s.edges_at_energy() .. figure:: images/EELS_edges_at_energy.png diff --git a/doc/user_guide/images/EDS_preferences_gui.png b/doc/user_guide/images/EDS_preferences_gui.png index 11392d7ea..3985a0c83 100644 Binary files a/doc/user_guide/images/EDS_preferences_gui.png and b/doc/user_guide/images/EDS_preferences_gui.png differ diff --git a/doc/user_guide/metadata_structure.rst b/doc/user_guide/metadata_structure.rst index cdbaa1a7d..985d8052b 100644 --- a/doc/user_guide/metadata_structure.rst +++ b/doc/user_guide/metadata_structure.rst @@ -101,6 +101,8 @@ General See :external+hyperspy:ref:`HyperSpy-Metadata-General `. +.. _sample-metadata: + Sample ====== @@ -315,6 +317,8 @@ spectrometer The spectrometer model, e.g. Gatan Enfinium ER (Model 977). +.. _eds-detector-metadata: + EDS ^^^ diff --git a/exspy/_misc/eels/effective_angle.py b/exspy/_misc/eels/effective_angle.py index dabbf1944..e3cc40504 100644 --- a/exspy/_misc/eels/effective_angle.py +++ b/exspy/_misc/eels/effective_angle.py @@ -36,7 +36,8 @@ def effective_angle(E0, E, alpha, beta): Returns ------- - float : effective collection angle in mrad + effective_angle : float + The effective collection angle in mrad. Notes ----- diff --git a/exspy/_misc/eels/electron_inelastic_mean_free_path.py b/exspy/_misc/eels/electron_inelastic_mean_free_path.py index 4c865d415..f45e14acf 100644 --- a/exspy/_misc/eels/electron_inelastic_mean_free_path.py +++ b/exspy/_misc/eels/electron_inelastic_mean_free_path.py @@ -39,6 +39,15 @@ def iMFP_Iakoubovskii(density, electron_energy): beam_energy : float Electron beam energy in keV + Returns + ------- + inelastic_mean_free_path : float + The inelastic mean free path in nanometers. + + See Also + -------- + exspy.utils.eels.iMFP_TPP2M, exspy.utils.eels.angular_correction + Notes ----- For details see Equation 9 in reference [*]_. @@ -47,11 +56,6 @@ def iMFP_Iakoubovskii(density, electron_energy): ‘Thickness Measurements with Electron Energy Loss Spectroscopy’. Microscopy Research and Technique 71, no. 8 (2008): 626–31. https://onlinelibrary.wiley.com/doi/10.1002/jemt.20597 - - Returns - ------- - float - Inelastic mean free path in nanometers """ theta_C = 20 # mrad inv_lambda = ( @@ -64,7 +68,7 @@ def iMFP_Iakoubovskii(density, electron_energy): def iMFP_TPP2M(electron_energy, density, M, N_v, E_g): - """Electron inelastic mean free path using TPP-2M + """Electron inelastic mean free path using TPP-2M. Parameters ---------- @@ -81,8 +85,12 @@ def iMFP_TPP2M(electron_energy, density, M, N_v, E_g): Returns ------- - float - Inelastic mean free path in nanometers + inelastic_mean_free_path : float + The inelastic mean free path in nanometers. + + See Also + -------- + exspy.utils.eels.iMFP_Iakoubovskii, exspy.utils.eels.iMFP_angular_correction Notes ----- @@ -122,6 +130,15 @@ def iMFP_angular_correction(density, beam_energy, alpha, beta): alpha, beta : float Convergence and collection angles in mrad. + Returns + ------- + correction : float + The correction factor on the mean free path due to the collection angle. + + See Also + -------- + exspy.utils.eels.iMFP_Iakoubovskii, exspy.utils.eels.iMFP_TPP2M + Notes ----- For details see Equation 9 in reference [*]_. diff --git a/exspy/_misc/eels/tools.py b/exspy/_misc/eels/tools.py index 7349fdfa4..61c3e7e10 100644 --- a/exspy/_misc/eels/tools.py +++ b/exspy/_misc/eels/tools.py @@ -376,6 +376,10 @@ def get_edges_near_energy(energy, width=10, only_major=False, order="closest"): edges : list All edges that are within the given energy window, sorted by energy difference to the given energy. + + See Also + -------- + exspy.utils.eels.get_info_from_edges """ if width < 0: @@ -428,8 +432,12 @@ def get_info_from_edges(edges): Returns ------- info : list - a list of dictionaries with information corresponding to the provided + A list of dictionaries with information corresponding to the provided edges. + + See Also + -------- + exspy.utils.eels.get_edges_near_energy """ edges = np.atleast_1d(edges) diff --git a/exspy/_misc/material.py b/exspy/_misc/material.py index 8fc5fd733..08f6c034d 100644 --- a/exspy/_misc/material.py +++ b/exspy/_misc/material.py @@ -32,9 +32,9 @@ def _weight_to_atomic(weight_percent, elements): Parameters ---------- - weight_percent: array of float + weight_percent : array of float The weight fractions (composition) of the sample. - elements: list of str + elements : list of str A list of element abbreviations, e.g. ['Al','Zn'] Returns @@ -42,8 +42,11 @@ def _weight_to_atomic(weight_percent, elements): atomic_percent : array of float Composition in atomic percent. + Examples + -------- Calculate the atomic percent of modern bronze given its weight percent: - >>> hs.material.weight_to_atomic((88, 12), ("Cu", "Sn")) + + >>> exspy.material.weight_to_atomic((88, 12), ("Cu", "Sn")) array([ 93.19698614, 6.80301386]) """ @@ -71,24 +74,29 @@ def weight_to_atomic(weight_percent, elements="auto"): Parameters ---------- - weight_percent: list of float or list of signals + weight_percent : list of float or list of signals The weight fractions (composition) of the sample. - elements: list of str + elements : list of str A list of element abbreviations, e.g. ['Al','Zn']. If elements is 'auto', take the elements in en each signal metadata of th weight_percent list. Returns ------- - atomic_percent : as weight_percent + atomic_percent : numpy.ndarray of float Composition in atomic percent. Examples -------- Calculate the atomic percent of modern bronze given its weight percent: - >>> hs.material.weight_to_atomic((88, 12), ("Cu", "Sn")) + + >>> exspy.material.weight_to_atomic((88, 12), ("Cu", "Sn")) array([ 93.19698614, 6.80301386]) + See also + -------- + exspy.material.atomic_to_weight + """ from hyperspy.signals import BaseSignal @@ -111,20 +119,21 @@ def _atomic_to_weight(atomic_percent, elements): Parameters ---------- - atomic_percent: array + atomic_percent : array The atomic fractions (composition) of the sample. - elements: list of str + elements : list of str A list of element abbreviations, e.g. ['Al','Zn'] Returns ------- - weight_percent : array of float - composition in weight percent. + weight_percent : numpy.ndarray of float + Composition in weight percent. Examples -------- Calculate the weight percent of modern bronze given its atomic percent: - >>> hs.material.atomic_to_weight([93.2, 6.8], ("Cu", "Sn")) + + >>> exspy.material.atomic_to_weight([93.2, 6.8], ("Cu", "Sn")) array([ 88.00501989, 11.99498011]) """ @@ -152,24 +161,29 @@ def atomic_to_weight(atomic_percent, elements="auto"): Parameters ---------- - atomic_percent: list of float or list of signals + atomic_percent : list of float or list of signals The atomic fractions (composition) of the sample. - elements: list of str + elements : list of str A list of element abbreviations, e.g. ['Al','Zn']. If elements is 'auto', take the elements in en each signal metadata of the atomic_percent list. Returns ------- - weight_percent : as atomic_percent - composition in weight percent. + weight_percent : numpy.ndarray of float + Composition in weight percent. Examples -------- Calculate the weight percent of modern bronze given its atomic percent: - >>> hs.material.atomic_to_weight([93.2, 6.8], ("Cu", "Sn")) + + >>> exspy.material.atomic_to_weight([93.2, 6.8], ("Cu", "Sn")) array([ 88.00501989, 11.99498011]) + See also + -------- + exspy.material.weight_to_atomic + """ from hyperspy.signals import BaseSignal @@ -194,23 +208,26 @@ def _density_of_mixture(weight_percent, elements, mean="harmonic"): Parameters ---------- - weight_percent: array + weight_percent : array A list of weight percent for the different elements. If the total is not equal to 100, each weight percent is divided by the sum of the list (normalization). - elements: list of str + elements : list of str A list of element symbols, e.g. ['Al', 'Zn'] - mean: 'harmonic' or 'weighted' - The type of mean use to estimate the density + mean : ``'harmonic'`` or ``'weighted'`` + The type of mean use to estimate the density. + Default is ``'harmonic'``. Returns ------- - density: The density in g/cm3. + density : numpy.ndarray of float + The density in g/cm3. Examples -------- Calculate the density of modern bronze given its weight percent: - >>> hs.material.density_of_mixture([88, 12],['Cu', 'Sn']) + + >>> exspy.material.density_of_mixture([88, 12],['Cu', 'Sn']) 8.6903187973131466 """ @@ -255,25 +272,28 @@ def density_of_mixture(weight_percent, elements="auto", mean="harmonic"): Parameters ---------- - weight_percent: list of float or list of signals + weight_percent : list of float or list of signals A list of weight percent for the different elements. If the total is not equal to 100, each weight percent is divided by the sum of the list (normalization). - elements: list of str + elements : list of str A list of element symbols, e.g. ['Al', 'Zn']. If elements is 'auto', take the elements in en each signal metadata of the weight_percent list. - mean: 'harmonic' or 'weighted' - The type of mean use to estimate the density + mean : ``'harmonic'`` or ``'weighted'`` + The type of mean use to estimate the density. + Default is ``'harmonic'``. Returns ------- - density: The density in g/cm3. + density : numpy.ndarray of float or hyperspy.api.signals.BaseSignal + The density in g/cm3. Examples -------- Calculate the density of modern bronze given its weight percent: - >>> hs.material.density_of_mixture([88, 12],['Cu', 'Sn']) + + >>> exspy.material.density_of_mixture([88, 12],['Cu', 'Sn']) 8.6903187973131466 """ @@ -306,17 +326,18 @@ def mass_absorption_coefficient(element, energies): Return ------ - mass absorption coefficient(s) in cm^2/g + mass_absorption_coefficients : numpy.ndarray of float + Mass absorption coefficient(s) in cm^2/g Examples -------- - >>> hs.material.mass_absorption_coefficient( + >>> exspy.material.mass_absorption_coefficient( >>> element='Al', energies=['C_Ka','Al_Ka']) array([ 26330.38933818, 372.02616732]) See also -------- - :py:func:`~hs.material.mass_absorption_mixture` + exspy.material.mass_absorption_mixture Note ---- @@ -366,18 +387,18 @@ def _mass_absorption_mixture(weight_percent, elements, energies): Examples -------- - >>> hs.material.mass_absorption_mixture( + >>> exspy.material.mass_absorption_mixture( >>> elements=['Al','Zn'], weight_percent=[50,50], energies='Al_Ka') 2587.4161643905127 Return ------ - float or array of float - mass absorption coefficient(s) in cm^2/g + mass_absorption_coefficient : numpy.ndarray of float + The mass absorption coefficient(s) in cm^2/g See also -------- - :py:func:`~hs.material.mass_absorption` + exspy.material.mass_absorption Note ---- @@ -427,18 +448,18 @@ def mass_absorption_mixture(weight_percent, elements="auto", energies="auto"): Examples -------- - >>> hs.material.mass_absorption_mixture( + >>> exspy.material.mass_absorption_mixture( >>> elements=['Al','Zn'], weight_percent=[50,50], energies='Al_Ka') 2587.41616439 Return ------ - float or array of float - mass absorption coefficient(s) in cm^2/g + mass_absorption_coefficient : numpy.ndarray of float or hyperspy.api.signals.BaseSignal + The Mass absorption coefficient(s) of the mixture in cm^2/g See also -------- - :py:func:`~hs.material.mass_absorption_coefficient` + exspy.material.mass_absorption_coefficient Note ----