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:

```python
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")

myCrystal.add_atom(myAtom)
```


Band structures in reciprocal space
===================================

The band structure can either be generated by a Tight Binding model (based on [PythTB](http://physics.rutgers.edu/pythtb/)) or parabolic bands.


Example usage:
```python
from pyeels import ParabolicBand

myCrystal_pb = ParabolicBand(myCrystal)

myCrystal_pb.set_grid(mesh=25)

# 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
myCrystal_pb.bandstructure()
```




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](http://hyperspy.org/) signal, that can be investigated real time.

Example usage:

```python
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

mySystem.set_meta(
name="My test sample",
author=["Supervisor", "Student"],
title="myCrystal",
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))

mySignal.plot()
```


Project details


Download files

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

Source Distribution

PyEELS-0.2.3.tar.gz (29.8 kB view details)

Uploaded Source

File details

Details for the file PyEELS-0.2.3.tar.gz.

File metadata

  • Download URL: PyEELS-0.2.3.tar.gz
  • Upload date:
  • Size: 29.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyEELS-0.2.3.tar.gz
Algorithm Hash digest
SHA256 44e0817be0475f0110f28eb5e8b7f3de823a601470734cc3a5b406d85e54a850
MD5 a5d399e99cf54f8392ce0635c15f77b4
BLAKE2b-256 3ad034873291c0e55f1ceebbef55e73927dc344ccbf0255b88f07bf7de094bc6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page