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.5.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.5-py3-none-any.whl (297.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyeelsmodel-1.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 ec702f62fce72c86f6a1859e7e60580a00b05b541e4d76da3497a94b3d54c986
MD5 a7bac46e3898f564bd3dbfb6c70f12e3
BLAKE2b-256 e0246243312bc8ea2ba93da7fd062115fbd89b2035700b7e9598ed8eb8c5ed13

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyeelsmodel-1.0.5.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.5-py3-none-any.whl.

File metadata

  • Download URL: pyeelsmodel-1.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 dc5730b4737b554b301beedb834ed0e260b92a98c9ed355d736f01031528dcc4
MD5 08a7096f7c3e1ca9a454339a76fb05ec
BLAKE2b-256 be24ef455c455947d74261a4db6e18761239797d75aa48c109ac925e3e1f49d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyeelsmodel-1.0.5-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