Skip to content

Instantly share code, notes, and snippets.

@thomasaarholt
Created June 18, 2020 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasaarholt/b6a2bf7b522fba25d8b56c8ea2c44636 to your computer and use it in GitHub Desktop.
Save thomasaarholt/b6a2bf7b522fba25d8b56c8ea2c44636 to your computer and use it in GitHub Desktop.
Hyperspy Expression component for EELS Bandgap Onsets
import hyperspy.api as hs
expr = "where(Eg < x, A*(x-Eg)*n, 0)"
bandgap = hs.model.components1D.Expression(expr, 'Bandgap', Eg=3.0, n=1, A=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment