Skip to main content

Fit various Electron EMIssion models on experimental data.

Project description

EEmiLib

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.

Features

  • Multiple electron emission models
  • Graphical interface for quick model fitting
  • Python API for scripting and automation

Installation

  1. Create a dedicated Python environment.
  2. Run
pip install EEmiLib

[!NOTE] If you are completely new to Python and these instructions are unclear, check this tutorial. In particular, you will want to:

  1. Install Python 3.12 or higher.
  2. Learn to use Python environments, pipenv or virtualenv.
  3. Optionally, install a Python IDE such as Spyder or VSCode.

If you want to edit the source code:

  1. 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.

  2. Create a dedicated Python environment.

  3. From EEmiLib folder: pip install -e .[test]

  4. Test that everything is working with pytest -m "not implementation".

Usage

Graphical User Interface

To start the GUI, run following command in a bash:

eemilib-gui

A Module not found error generally means that the EEmiLib Python environment is not activated.

GUI animation

Python API

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,
)

Roadmap/To-Do

  • Document abbreviations
  • Handle experimental data with error bars
  • Add control over interpolation of loaded experimental data
  • Optional smoothing of measured data
  • In GUI, display additional model information:
    • Quantitative criteria to assess model quality (e.g., Nicolas Fil's criterion)
    • Derived quantities such as crossover energies, maximum TEEY, etc.
  • Models:
    • Extend Chung–Everhart fitting to multiple data files
    • Dionne
    • Dionne 3D
    • Dekker
    • Furman and Pivi
  • PyPI release.
  • Different line styles/colors for different populations.
  • Export buttons
    • Tabulated model data.
    • Model parameters value (makes sense along with an Import button).
  • 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).
  • Update installation instructions.
  • Model.display_parameters() method for nice printing API.

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

eemilib-0.0.15.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

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

eemilib-0.0.15-py3-none-any.whl (113.9 kB view details)

Uploaded Python 3

File details

Details for the file eemilib-0.0.15.tar.gz.

File metadata

  • Download URL: eemilib-0.0.15.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eemilib-0.0.15.tar.gz
Algorithm Hash digest
SHA256 86d9ef71ccc584efdd5ea465ae3f37712fbfac1b0d1123fcbd55bdcba93e7dae
MD5 c964e2ce86cb53ab8ce29c009564cf56
BLAKE2b-256 4ff364d9f4ee4f63c31ce9d3b204d8d44798aef86d112cdc7682c2120d6aa63c

See more details on using hashes here.

Provenance

The following attestation bundles were made for eemilib-0.0.15.tar.gz:

Publisher: release.yml on AdrienPlacais/EEmiLib

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

File details

Details for the file eemilib-0.0.15-py3-none-any.whl.

File metadata

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

File hashes

Hashes for eemilib-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 51ca3d94f9344843ba47049cccd83ef6fca067a7597d4ed2c988947f2aa6d612
MD5 9371421c7f3caa03506fa51ab2981ecf
BLAKE2b-256 448a221097e8b5f334aea8e77fee317166d1705e951a849ff10bd2a453d72a40

See more details on using hashes here.

Provenance

The following attestation bundles were made for eemilib-0.0.15-py3-none-any.whl:

Publisher: release.yml on AdrienPlacais/EEmiLib

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