EEmiLib (Electron EMIssion Library) provides several electron emission models and a simple interface to fit them to experimental data. It includes both a graphical user interface (GUI) for ease of use and a Python API for advanced users.
The library focuses on electron emission models relevant to multipactor simulations, i.e. for impinging energies ranging from a few eV to several hundred eV.
This project is still under active development. I maintain it in my free time, but I'll do my best to answer any questions you may have.
- Multiple electron emission models
- Graphical interface for quick model fitting
- Python API for scripting and automation
- Create a dedicated Python environment.
- Run
pip install EEmiLibNote
If you are completely new to Python and these instructions are unclear, check this tutorial. In particular, you will want to:
- Install Python 3.12 or higher.
- Learn to use Python environments,
pipenvorvirtualenv. - Optionally, install a Python IDE such as Spyder or VSCode.
If you want to edit the source code:
- Clone the repository:
git clone git@github.com:AdrienPlacais/EEmiLib.git
Warning
If you Download ZIP this repository (which can happen if you don't have access to git), installation will fail at step #3.
A workaround is proposed here.
This is a different library, but the same method applies.
- Create a dedicated Python environment.
- From EEmiLib folder:
pip install -e .[test] - Test that everything is working with
pytest -m "not implementation".
To start the GUI, run following command in a bash:
eemilib-guiA Module not found error generally means that the EEmiLib Python environment
is not activated.
import numpy as np
from eemilib.emission_data import DataMatrix
from eemilib.loader import PandasLoader
from eemilib.model import Vaughan
from eemilib.plotter import PandasPlotter
from eemilib import teey_cu
filepath = [teey_cu / "measured_TEEY_Cu_1_eroded.csv"]
# Object holding filepaths
data_matrix = DataMatrix()
# Indicate that this is TEEY file
data_matrix.set_files(
filepath, population="all", emission_data_type="Emission Yield"
)
data_matrix.load_data(PandasLoader())
# Plot experimental data
plotter = PandasPlotter()
axes = data_matrix.plot(
plotter, population="all", emission_data_type="Emission Yield"
)
# Select model and fit
model = Vaughan()
model.find_optimal_parameters(data_matrix)
# Plot fitted data
model.plot(
plotter,
population="all",
emission_data_type="Emission Yield",
energies=np.linspace(0, 1000, 1001),
angles=np.linspace(0, 60, 4),
axes=axes,
)-
Document abbreviations
-
GUI:
- Better handling of multiple
Plot dataandPlot modelbuttons push. - Display quantitative criteria to assess model quality (e.g., Nicolas Fil's criterion)
- Display derived quantities such as crossover energies, maximum TEEY, etc.
- Better handling of multiple
-
CI:
-
PyPIrelease. - Update installation instructions.
- ? Allow execution on online Docker, or make executable?
-
-
Exportbuttons- Tabulated model data.
- Model parameters value (makes sense along with an
Importbutton).
-
Fix error when not running from a git repo:
fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).` -
API:
-
Model.display_parameters()method for nice printing. - Import/export model configuration with a
TOML.
-
-
If it proves useful:
- Handle experimental data with error bars
- Add control over interpolation of loaded experimental data
- Optional smoothing of measured data
- Different line styles/colors for different populations.
