model module
Define the base class for all electron emission models.
Todo
Define all the properties: EBEEY, emission energy distributions, etc.
- class Model(*args, parameters_values: dict[str, Any] | None = None, **kwargs)
Bases:
ABCDefine the base electron emission model.
- Parameters:
emission_data_types (list[Literal['Emission Yield', 'Emission Energy', 'Emission Angle']]) – Types of modelled data.
populations (list[Literal['SE', 'EBE', 'IBE', 'all']]) – Modelled populations.
considers_energy (bool) – Tell if the model has a dependency over PEs impact energy.
is_3d (bool) – Tell if the model has a dependency over PEs impact angle.
is_dielectrics_compatible (bool) – Tell if the model can take the surface-trapped charges into account.
initial_parameters (dict[str, dict[str, str | float | bool]]) – List the
Parameterkwargs.model_config (eemilib.core.model_config.ModelConfig) – List the files that the model needs to know in order to work.
- model_config: ModelConfig
- __init__(*args, parameters_values: dict[str, Any] | None = None, **kwargs) None
Instantiate the object.
- Parameters:
parameters_values – Contains name of parameters and associated value. If provided, will override the default values set in
initial_parameters.
- teey(energy: ndarray[tuple[Any, ...], dtype[float64]], theta: ndarray[tuple[Any, ...], dtype[float64]], *args, **kwargs) DataFrame
Compute TEEY \(\sigma\).
- seey(energy: ndarray[tuple[Any, ...], dtype[float64]], theta: ndarray[tuple[Any, ...], dtype[float64]], *args, **kwargs) DataFrame
Compute SEEY \(\delta\).
- se_energy_distribution(energy: ndarray[tuple[Any, ...], dtype[float64]], theta: ndarray[tuple[Any, ...], dtype[float64]], *args, **kwargs) DataFrame
Compute SEs emission energy distribution.
- get_data(population: Literal['SE', 'EBE', 'IBE', 'all'], emission_data_type: Literal['Emission Yield', 'Emission Energy', 'Emission Angle'], energy: ndarray[tuple[Any, ...], dtype[float64]], theta: ndarray[tuple[Any, ...], dtype[float64]], *args, **kwargs) DataFrame | None
Return desired data according to current model.
You should override this method for each
Modelsubclass. When desired data is not found, aNoneis returned. If you want a dummy dataframe instead, call the specific methods for every quantity:Model.teey(),Model.seey(),Model.se_energy_distribution().
- abstractmethod find_optimal_parameters(data_matrix: DataMatrix, **kwargs) None
Find the best parameters for the current model.
- plot(plotter: Plotter, population: Literal['SE', 'EBE', 'IBE', 'all'] | Collection[Literal['SE', 'EBE', 'IBE', 'all']], emission_data_type: Literal['Emission Yield', 'Emission Energy', 'Emission Angle'], energies: ndarray[tuple[Any, ...], dtype[float64]], angles: ndarray[tuple[Any, ...], dtype[float64]], axes: T | None = None, grid: bool = True, **kwargs) T | None
Plot desired modelled data using
plotter.This method uses
Model.get_data()to compute the modelled data matchingpopulationandemission_data_type. Then it calls theModel.plot()method.- Parameters:
plotter – Object realizing the plot. We transfer it to the
Model.plot()method.population – One or several populations to plot. If several are given, we simply recursively call this method.
emission_data_type – Type of data to plot.
energies – Energies in \(\mathrm{eV}\) for which model should be plotted.
angles – Angles in \(\mathrm{deg}\) for which model should be plotted.
axes – Axes to re-use if given.
grid – If grid should be plotted.
kwargs – Other keyword arguments passed to the
Model.plot()method.
- Return type:
Created axes object, or
Noneif no plot was created.
- evaluate(data_matrix: DataMatrix, *args, **kwargs) dict[str, float]
Evaluate the precision of the model w.r.t. given data.
- _evaluate_for_teey_models(data_matrix: DataMatrix) dict[str, float]
Evaluate a TEEY model with N. Fil criterions.
- _error_ec1(emission_yield: EmissionYield) float
Compute relative error over first crossover energy in \(\mathrm{%}\).
- _error_teey(emission_yield: EmissionYield) float
Compute TEEY relative error between E_c1 and E_max in \(\mathrm{%}\).
- _abc_impl = <_abc._abc_data object>