vaughan module
Create the Vaughan model, to compute TEEY.
TEEY at non-normal incidence will not be taken into account into the fit (FIXME).
Todo
Make this more robust. Especially the _vaughan_func.
Model parameters
Parameter |
Name |
Unit |
Initial |
Description |
|---|---|---|---|---|
\(E_0\) |
E_0 |
\(\mathrm{eV}\) |
\(12.5\) |
Threshold energy. By default, locked to \(12.5\mathrm{\,eV}\). If unlocked, will be fitted to retrieve \(E_{\mathrm{c,\,1}}\). |
\(E_\mathrm{max}\) |
E_max |
\(\mathrm{eV}\) |
\(100.0\) |
Energy at maximum TEEY. |
\(\Delta E_{tr}\) |
delta_E_transition |
\(\mathrm{eV}\) |
\(1.0\) |
Energy over which we switch from \(\sigma_\mathrm{low}\) to actual Vaughan TEEY. Useful for smoothing the transition. Currently not implemented. |
\(\sigma_\mathrm{low}\) |
teey_low |
\(\mathrm{1}\) |
\(0.5\) |
TEEY below \(E_0\). |
\(\sigma_\mathrm{max}\) |
teey_max |
\(\mathrm{1}\) |
\(1.5\) |
Maximum TEEY, directly taken from the measurement. |
\(k_s\) |
k_s |
\(\mathrm{1}\) |
\(1.0\) |
Roughness factor (\(\sigma_\mathrm{max}\)). Locked by default, but could be used for more precise fits. |
\(k_{se}\) |
k_se |
\(\mathrm{1}\) |
\(1.0\) |
Roughness factor (\(E_\mathrm{max}\)). Locked by default, but could be used for more precise fits. |
\(E_{\mathrm{c,\,1}}\) |
E_c1 |
\(\mathrm{eV}\) |
\(25.0\) |
First crossover energy. Must be provided instead of \(E_0\) for SPARK3D Vaughan. |
- class Vaughan(implementation='original', parameters_values=None)
Bases:
ModelDefine the classic Vaughan model.
Instantiate the object.
Note
Parameter values set by
implementationhave priority over values given inparameters_values.- Parameters:
implementation (
Literal['original','CST','SPARK3D'], default:'original') – Modifies certain presets to match different interpretations of the model by callingset_implementation(). These parameter modifications have precedence over the ones set inparameters_values.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.
-
emission_data_types:
list[Literal['Emission Yield','Emission Energy','Emission Angle']] = ['Emission Yield']
-
model_config:
ModelConfig= ModelConfig(emission_yield_files=('all',), emission_energy_files=(), emission_angle_files=())
-
initial_parameters:
dict[str,dict[str,str|float|bool]] = {'E_0': {'description': 'Threshold energy. By default, locked to :math:`12.5\\mathrm{\\,eV}`. If unlocked, will be fitted to retrieve :math:`E_{\\mathrm{c,\\,1}}`.', 'is_locked': True, 'markdown': 'E_0', 'unit': 'eV', 'value': 12.5}, 'E_c1': {'description': 'First crossover energy. Must be provided instead of :math:`E_0` for SPARK3D Vaughan.', 'is_locked': False, 'markdown': 'E_{\\mathrm{c,\\,1}}', 'unit': 'eV', 'value': 25.0}, 'E_max': {'description': 'Energy at maximum TEEY.', 'lower_bound': 0.0, 'markdown': 'E_\\mathrm{max}', 'unit': 'eV', 'value': 100.0}, 'delta_E_transition': {'description': 'Energy over which we switch from :math:`\\sigma_\\mathrm{low}` to actual Vaughan TEEY. Useful for smoothing the transition. Currently not implemented.', 'is_locked': True, 'markdown': '\\Delta E_{tr}', 'unit': 'eV', 'value': 1.0}, 'k_s': {'description': 'Roughness factor (:math:`\\sigma_\\mathrm{max}`). Locked by default, but could be used for more precise fits.', 'is_locked': True, 'lower_bound': 0.0, 'markdown': 'k_s', 'unit': '1', 'upper_bound': 2.0, 'value': 1.0}, 'k_se': {'description': 'Roughness factor (:math:`E_\\mathrm{max}`). Locked by default, but could be used for more precise fits.', 'is_locked': True, 'lower_bound': 0.0, 'markdown': 'k_{se}', 'unit': '1', 'upper_bound': 2.0, 'value': 1.0}, 'teey_low': {'description': 'TEEY below :math:`E_0`.', 'is_locked': True, 'lower_bound': 0.0, 'markdown': '\\sigma_\\mathrm{low}', 'unit': '1', 'value': 0.5}, 'teey_max': {'description': 'Maximum TEEY, directly taken from the measurement.', 'lower_bound': 0.0, 'markdown': '\\sigma_\\mathrm{max}', 'unit': '1', 'value': 1.5}}
-
parameters:
VaughanParameters A
TypedDictspecific to everymodel.Model. Keys are parameters names, values areParameter.
- set_implementation(implementation)
Update some parameters to reproduce a specific implementation.
Vaughan CST:
\(\sigma_\mathrm{low}\) is set to 0.
Vaughan SPARK3D:
\(\sigma_\mathrm{low}\) is set to 0.
\(E_0\) is unlocked, so that it will be fitted to match \(E_{c,\,1}\).
Below \(10\) \(\mathrm{eV}\), TEEY is 0.
Note
If the implementation is changed after the creation of the object, some parameters will be reset to their default value defined in
initial_parameters, not to the values defined in theparameters_valuesargument of__init__method.- Return type:
- get_data(population, emission_data_type, energy, theta, *args, **kwargs)
Return desired data according to current model.
Will return a dataframe only if the TEEY is asked.
Todo
This method could be so much simpler and efficient.
- find_optimal_parameters(data_matrix, **kwargs)
Match with position of first crossover and maximum.
- Return type:
- vaughan_func(ene, the, E_0, E_max, teey_max, teey_low, k_se, k_s, delta_E_transition, **parameters)
Compute the TEEY for incident energy E.
- vaughan_spark3d(ene, the, E_0, E_max, teey_max, teey_low, k_se, k_s, delta_E_transition, **parameters)
Compute TEEY as SPARK3D would.
This is a classic Vaughan, but TEEY is null for energies below
E_0_SPARK3D=10.0. This parameter is different from the classicE_0that appears in the expression of \(\xi\).