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=None, **kwargs)
Bases:
ABCDefine the base electron emission model.
- Parameters:
emission_data_types – Types of modelled data.
populations – Modelled populations.
considers_energy – Tell if the model has a dependency over PEs impact energy.
is_3d – Tell if the model has a dependency over PEs impact angle.
is_dielectrics_compatible – Tell if the model can take the surface-trapped charges into account.
initial_parameters – List the
Parameterkwargs.model_config – List the files that the model needs to know in order to work.
implementations – List of different implementations for the same
Model. See for examplevaughan.Vaughan.
Instantiate the object.
- Parameters:
parameters_values (
dict[str,Any] |None, default:None) – Contains name of parameters and associated value. If provided, will override the default values set ininitial_parameters.
-
model_config:
ModelConfig
-
parameters:
Any A
TypedDictspecific to everymodel.Model. Keys are parameters names, values areParameter.
- se_energy_distribution(energy, theta, *args, **kwargs)
Compute SEs emission energy distribution.
- Return type:
- get_data(population, emission_data_type, energy, theta, *args, **kwargs)
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, **kwargs)
Find the best parameters for the current model.
- Return type:
- plot(plotter, population, emission_data_type, energies, angles, axes=None, grid=True, **kwargs)
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 (
Plotter) – Object realizing the plot. We transfer it to theModel.plot()method.population (
Literal['SE','EBE','IBE','all'] |Collection[Literal['SE','EBE','IBE','all']]) – One or several populations to plot. If several are given, we simply recursively call this method.emission_data_type (
Literal['Emission Yield','Emission Energy','Emission Angle']) – Type of data to plot.energies (
ndarray[tuple[Any,...],dtype[float64]]) – Energies in \(\mathrm{eV}\) for which model should be plotted.angles (
ndarray[tuple[Any,...],dtype[float64]]) – Angles in \(\mathrm{deg}\) for which model should be plotted.axes (
TypeVar(T) |None, default:None) – Axes to re-use if given.grid (
bool, default:True) – If grid should be plotted.kwargs – Other keyword arguments passed to the
Model.plot()method.
- Return type:
- Returns:
Created axes object, or
Noneif no plot was created.
- reset_parameter_value(name)
Reset a parameter value to its default.
Default is defined in
initial_parameters.- Return type:
- evaluate(data_matrix, *args, evaluations=None, **kwargs)
Evaluate the precision of the model w.r.t. given data.
For now, the only evaluations are TEEY or SEEY criterions proposed by Fil et al. [FBHP16, FBHP20].
- Parameters:
data_matrix (
DataMatrix) – Holds all measured electron emission data.evaluations (
dict[str,float] |None, default:None) – Maps names of quality criterions with their actual value. If given, it will be preserved and additional evaluations may be added.
- Returns:
Maps names of quality criterions with their actual value.
- Return type:
- _main_teey_parameters()
Compute main TEEY parameters.
In particular: $E_{c1}$, $E_{max}$, $sigma_{max}$.
- _error_ec1(emission_yield)
Compute relative error over first crossover energy in \(\mathrm{%}\).
- Return type: