Skip to main content

(NB! Still in development) Python package for simulating EELS from band structures

Project description

PyEELS - Python EELS simulation package

PyEELS is a package for simulation Electron Energy Loss Spectra from model band structures. It can both be used as tool within education or comparison to experimental results.

The use of the package can be seen as threefold:
1. Creating real space crystal models
2. Create/generate band structures in reciprocal space
3. Simulate EELS on the model band structures

Creating real space crystal models

The crystal defines much of the reciprocal band structure, a model of the crystal is thus important if a realistic band structure is to be generated.
Some parameters defined in the crystal are important for the reciprocal space calculation (i.e. Tight Binding)

Example usage:

from pyeels import Crystal, Atom, Orbital
import numpy as np

myCrystal = Crystal(lattice=np.array([
[1, 0, 0],
[0, 1, 0],
[0, 0, 1]])

myAtom = Atom(number=1, position=[0,0,0])
myAtom.add_orbital(Orbital(label="s", onsite="-2")


Band structures in reciprocal space

The band structure can either be generated by a Tight Binding model (based on [PythTB]( or parabolic bands.

Example usage:
from pyeels import ParabolicBand

myCrystal_pb = ParabolicBand(myCrystal)


# Affects the band structure in myCrystal
# Creates two parabolic bands with a direct band gap of 1
myCrystal_pb.set_parabolic(energy_offset=0, effective_mass=[-1, -1, -1], k_center=[0, 0, 0])
myCrystal_pb.set_parabolic(energy_offset=1, effective_mass=[ 1, 1, 1], k_center=[0, 0, 0])

# Visualization of the bands

Simulation of EEL-spectrum from the model system

The band structure gives the basis of the EEL-spectrum of a crystal. This simulation package lets you adjust all parameters in order to examine the effect of different features.
The outcomming signal is a [hyperspy]( signal, that can be investigated real time.

Example usage:

from pyeels import EELS

mySystem = EELS(myCrystal)
mySystem.temperature = 0 # Absolute zero
mySystem.fermienergy = 0.5 # Placing the fermi level at center of the band gap

name="My test sample",
author=["Supervisor", "Student"],
notes="This model is just an example."

# The resolution of the diffraction zone, (can relate to the CCD-resolution)
mySystem.set_diffraction_zone() #No input autogenerates a zone

mySignal = mySystem.calculate_eels_multiproc(energyBins=np.linspace(0,4,50))


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for PyEELS, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size PyEELS-0.2.3.tar.gz (29.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page