Skip to main content

a model based quantification library for electron energy loss spectroscopy

Project description

License: GPL v3 DOI

pyEELSMODEL

pyEELSMODEL is a electron energy loss spectroscopy software based on the former c++ software. This software uses the model-based approach to quantify EEL spectra.

See https://pyeelsmodel.readthedocs.io/ for more information.

Installing

The easiest way to install pyEELSMODEL is through the release hosted on PyPI:

pip install pyEELSMODEL

or by first cloning this repository to your computer via:

git clone https://github.com/joverbee/pyEELSMODEL.git

and then navigate to the pyEELMODEL directory and type following into the command line:

pip install .

If you want to create an editable install one needs to do following:

pip install -e .

When they are first needed, the generalized oscillator strengths (GOS) tables will be automatically imported. The GOS tables are necessary to perform EEL quantification since they are used to calculate the atomic cross sections. Two different GOS tables can be used for quantification:

  1. The GOS calculated by Zhang Z. et al. which can be found at doi:10.5281/zenodo.7729585.
  2. The GOS calculated by Segger L. et al. which can be found at doi:10.5281/zenodo.7645765.

The GOS tables can also be manually imported. To know in which directory your pyEELSMODEL package is installed, following command can be run in a python console:

import pyEELSMODEL
print(pyEELSMODEL.__path__)

This information is necessary for the proper use of the GOS tables.

GOS tables from Zhang Z.

Following steps explain how to manually setup the GOS array of Zhang Z.

  1. Download the Dirac_GOS_database.zip file
  2. Unzip the file
  3. Copy the *.hdf5 files in the folder to .pyEELSMODEL\database\Zhang folder which is found in the pyEELSMODEL folder

GOS tables from Segger L.

Following steps explain how to manually setup the GOS array of Segger L.

  1. Download the Segger_Guzzinati_Kohl_1.5.0.gosh (depends on version) file
  2. Copy the .gosh file to .pyEELSMODEL\database\Segger_Guzzinati_Kohl folder which is found in the pyEELSMODEL folder

The GOS tables are used in the quantification workflows so they are necessary to run the example notebooks, but they should be automatically installed the first time they are needed.

Using

import pyEELSMODEL.api as em
import numpy as np

size=1024
offset = 100 #[eV]
dispersion = 0.5 #[eV]

specshape = em.Spectrumshape(dispersion, offset, size)
data_array = np.random.random(size)

s = em.Spectrum(specshape, data=data_array)
s.plot() 

For more examples on how to use pyEELSMODEL, check the ./examples folder.
This folder has many examples on how to use the pyEELSMODEL package.

License

The project is licensed under the GPL-3.0 license

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

pyeelsmodel-1.0.4.tar.gz (244.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyeelsmodel-1.0.4-py3-none-any.whl (297.9 kB view details)

Uploaded Python 3

File details

Details for the file pyeelsmodel-1.0.4.tar.gz.

File metadata

  • Download URL: pyeelsmodel-1.0.4.tar.gz
  • Upload date:
  • Size: 244.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyeelsmodel-1.0.4.tar.gz
Algorithm Hash digest
SHA256 e3354530b76532ae4e529fcec9190412145bde51c8a4cd6366a6a658022480af
MD5 730865ef2242dfb66ebca383b89d8bda
BLAKE2b-256 bc8ede20f155158ad446daa5938bc082bcfefcbc0a822397abf2e8626ca00791

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyeelsmodel-1.0.4.tar.gz:

Publisher: python-app.yml on joverbee/pyEELSMODEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyeelsmodel-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: pyeelsmodel-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 297.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyeelsmodel-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c7fc3a9a6684c1d734ddf4a4316c9bc3b139d4e2ca182adc210562249132ef24
MD5 cc6d66fecd26fd06c4819c79668bd1c3
BLAKE2b-256 766d3ae0585a9992b8afb79878cdee6594e4b18c404e83ab56deff2495a0cb04

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyeelsmodel-1.0.4-py3-none-any.whl:

Publisher: python-app.yml on joverbee/pyEELSMODEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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