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.
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:
- The GOS calculated by Zhang Z. et al. which can be found at doi:10.5281/zenodo.7729585.
- 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.
Following steps explain how to manually setup the GOS array of Zhang Z.
- Download the Dirac_GOS_database.zip file
- Unzip the file
- Copy the *.hdf5 files in the folder to .pyEELSMODEL\database\Zhang folder which is found in the pyEELSMODEL folder
Following steps explain how to manually setup the GOS array of Segger L.
- Download the Segger_Guzzinati_Kohl_1.5.0.gosh (depends on version) file
- 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.
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.
The project is licensed under the GPL-3.0 license