ess.reduce.time_of_flight.interpolator_numba.interpolate#

ess.reduce.time_of_flight.interpolator_numba.interpolate(x, y, values, xp, yp, xoffset, deltax, fill_value, out)[source]#

Linear interpolation of data on a 2D regular grid.

Parameters:
  • x (ndarray) – 1D array of grid edges along the x-axis (size nx). They must be linspaced.

  • y (ndarray) – 1D array of grid edges along the y-axis (size ny). They must be linspaced.

  • values (ndarray) – 2D array of values on the grid. The shape must be (ny, nx).

  • xp (ndarray) – 1D array of x-coordinates where to interpolate (size N).

  • yp (ndarray) – 1D array of y-coordinates where to interpolate (size N).

  • xoffset (ndarray | None) – 1D array of integer offsets to apply to the x-coordinates (size N).

  • deltax (float) – Multiplier to apply to the integer offsets (i.e. the step size).

  • fill_value (float) – Value to use for points outside of the grid.

  • out (ndarray) – 1D array where the interpolated values will be stored (size N).