helper module

Define functions to extract some characteristics from emission data.

trim(normal_ey: DataFrame, min_e: float = -1.0, max_e: float = -1.0) DataFrame

Remove EY outside of given energy range (if provided).

Parameters:
  • normal_ey – Holds normal emission yield. Columns are EY_col1 (energy, stored by increasing values) and EY_colnorm (normal EY).

  • min_e – 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 – 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.

Returns:

  • normal_ey but with energies ranging only from min_e to

  • max_e.

resample(ey: DataFrame, n_interp: int = -1) DataFrame

Return the emission yield with more points and/or updated limits.

get_emax_eymax(normal_ey: DataFrame) tuple[float, float]

Get energy and max emission yields.

get_crossover_energies(normal_ey: DataFrame, e_max: float, min_e: float = 10.0) tuple[tuple[float, float], tuple[float, float]]

Compute first and second crossover energies.

Parameters:
  • normal_ey – Holds energy of PEs as well as emission yield at nominal incidence.

  • e_max – Energy of maximum emission yield. Used to discriminate \(E_{c1}\) from \(E_{c2}\).

  • min_e – 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.

Returns:

  • tuple[float, float] – First crossover energy, corresponding emission yield.

  • tuple[float, float] – Second crossover energy, corresponding emission yield.

get_ec1(normal_ey: DataFrame, min_e: float = -1.0, max_e: float = -1.0, n_interp: int = -1, **kwargs) float

Interpolate the energy vs teey array and give the E_c1.

get_max(teey: ~numpy.ndarray, E0: float = None, **kwargs) -> (<class 'float'>, <class 'float'>)

Interpolate the energy vs teey array and give the E and sigma max.