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.6.tar.gz (246.6 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.6-py3-none-any.whl (299.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyeelsmodel-1.0.6.tar.gz
Algorithm Hash digest
SHA256 971f68ee8c5be1914537e299a330c25b652e142c2f0ae1f9baf44b2044bff07b
MD5 bdf1f4aad11b006a65e099c88b4454bb
BLAKE2b-256 20bc6507530ac0875e1f5f6b5501fdf86e287da17934ceb025f263e3b04c2d3d

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for pyeelsmodel-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fbf8cf95cfa4cacb108e99f00554c062f8c4fa19b19a4b89b933d7a3a6a39aca
MD5 f96a57071344ce026bc51f2a8a41e01f
BLAKE2b-256 3813f34c551109d79d02ccaa59f37742eccdeff7c408c850a5d8723bedeff20c

See more details on using hashes here.

Provenance

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