imap_processing.idex.idex_l2a.calculate_kappa#

imap_processing.idex.idex_l2a.calculate_kappa(mass_scales: ndarray, peaks_2d: list) ndarray[tuple[int, ...], dtype[_ScalarType_co]]#

Calculate the kappa value for each mass scale.

Kappa represents the difference between the observed mass peaks and their expected integer values in the calculated mass scale. The value ranges between zero and one. A kappa value closer to zero indicates a better accuracy of the mass scale.

Parameters:
  • mass_scales (xarray.DataArray) – Array containing the masses at each time value for each dust event.

  • peaks_2d (list) – A Nested list of tof peak indices.

Returns:

Average distance from the assigned peak to the nearest integer value.

Return type:

numpy.ndarray