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 are EY_col1 (energy, stored by increasing values) and EY_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:

DataFrame

Returns:

normal_ey but with energies ranging only from min_e to max_e.

resample(ey, n_interp=-1)

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

Return type:

DataFrame

get_emax_eymax(normal_ey)

Get energy and max emission yields.

Return type:

tuple[float, float]

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:

tuple[tuple[float, float], tuple[float, float]]

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:

float

get_max(normal_ey, **kwargs)

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

Return type:

tuple[float, float]