ewoksxas.converters.resample.interpolate_spectrum#

ewoksxas.converters.resample.interpolate_spectrum(target_x, x, y)[source]#

Linearly interpolate the spectrum (x, y) onto target_x.

x need not be sorted: np.interp requires increasing sample points, so x and y are sorted together first.

Parameters:
  • target_x (ndarray[tuple[int, ...], dtype[float64]])

  • x (ndarray[tuple[int, ...], dtype[float64]])

  • y (ndarray[tuple[int, ...], dtype[float64]])

Return type:

ndarray[tuple[int, ...], dtype[float64]]