Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import hyperspy.api as hs
s = hs.load("MO")
# Get peak energy
Zr_Peak = 330.
O_peak = 532.
# Create signals with enough background and signal length to fit the components.
s_Zr = s.isig[Zr_Peak - 40.:Zr_Peak + 60.]
s_O = s.isig[O_peak - 40.:O_peak + 60.]
# Remove background
s_O2 = s_O.remove_background(signal_range=(395, 525.), background_type="PowerLaw", estimate_background=False)
s_Zr = s_Zr.remove_background(signal_range=(290.,320.), background_type="PowerLaw", estimate_background=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.