EELS curve fitting#

Performs curve fitting to an EELS spectrum, plots the result and saves it as png file.

coreloss_spectrum Signal
import hyperspy.api as hs

s = hs.load("coreloss_spectrum.msa", signal_type="EELS")
low_loss = hs.load("lowloss_spectrum.msa", signal_type="EELS")

s.add_elements(("Mn", "O"))
s.set_microscope_parameters(
    beam_energy=300, convergence_angle=24.6, collection_angle=13.6
)

m = s.create_model(low_loss=low_loss)
m.enable_fine_structure()
m.multifit(kind="smart")
m.plot()

# one can also use the Dirac GOS by specifying the GOS parameter
m = s.create_model(low_loss=low_loss, GOS="dirac")
m.enable_fine_structure()
m.multifit(kind="smart")
m.plot()

Total running time of the script: (0 minutes 5.319 seconds)

Gallery generated by Sphinx-Gallery