Skip to main content
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()
```


Metadata

Release files for PyEELS 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyEELS 0.2.3
File Size Uploaded Provenance Actions
PyEELS-0.2.3.tar.gz 29.8 kB Without provenance Details for PyEELS-0.2.3.tar.gz

Release files / PyEELS-0.2.3.tar.gz

Download URL PyEELS-0.2.3.tar.gz
Size 29.8 kB
Tags Source
SHA-256 checksum
How to use checksums
44e0817be0475f0110f28eb5e8b7f3de823a601470734cc3a5b406d85e54a850
BLAKE2b-256 checksum
How to use checksums
3ad034873291c0e55f1ceebbef55e73927dc344ccbf0255b88f07bf7de094bc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for PyEELS 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page