helper module
Define functions to extract some characteristics from emission data.
- trim(normal_ey, min_e=-1.0, max_e=-1.0)
Remove EY outside of given energy range (if provided).
- Parameters:
normal_ey (
DataFrame) – Holds normal emission yield. Columns areEY_col1(energy, stored by increasing values) andEY_colnorm(normal EY).min_e (
float, default:-1.0) – Energy at which the output dataframe should start (if provided). The default is a negative value, in which case the output dataframe is not bottom-trimed.max_e (
float, default:-1.0) – Energy at which the output dataframe should end (if provided). The default is a negative value, in which case the output dataframe is not top-trimed.
- Return type:
- Returns:
normal_eybut with energies ranging only frommin_etomax_e.
- resample(ey, n_interp=-1)
Return the emission yield with more points and/or updated limits.
- Return type:
- get_crossover_energies(normal_ey, e_max, min_e=10.0)
Compute first and second crossover energies.
- Parameters:
normal_ey (
DataFrame) – Holds energy of PEs as well as emission yield at nominal incidence.e_max (
float) – Energy of maximum emission yield. Used to discriminate \(E_{c1}\) from \(E_{c2}\).min_e (
float, default:10.0) – Energy under which \(E_{c1}\) is not searched. It is useful if emission yield data comes from a model which sets the emission yield to unity at very low energies (eg some implementations of Vaughan). The default value is 10 eV.
- Return type:
- Returns:
tuple[float, float] – First crossover energy, corresponding emission yield.
tuple[float, float] – Second crossover energy, corresponding emission yield.
- get_ec1(normal_ey, **kwargs)
Interpolate the energy vs teey array and give the E_c1.
- Return type: