SplineGriddataInterpolation#

class sionna.phy.utils.SplineGriddataInterpolation[source]#

Bases: sionna.phy.utils.misc.Interpolate

Interpolates data defined on rectangular or unstructured grids via Scipy’s interpolate.RectBivariateSpline and interpolate.griddata, respectively.

Inherits from Interpolate.

Methods

struct(z: numpy.ndarray, x: numpy.ndarray, y: numpy.ndarray, x_interp: numpy.ndarray, y_interp: numpy.ndarray, spline_degree: int = 1, **kwargs) numpy.ndarray[source]#

Performs spline interpolation via Scipy’s interpolate.RectBivariateSpline.

Parameters:
  • z (numpy.ndarray) – Co-domain sample values of shape [N, M]. Informally, z = f(x, y).

  • x (numpy.ndarray) – First coordinate of the domain sample values of shape [N].

  • y (numpy.ndarray) – Second coordinate of the domain sample values of shape [M].

  • x_interp (numpy.ndarray) – Interpolation grid for the first (x) coordinate of shape [L]. Typically, \(L \gg N\).

  • y_interp (numpy.ndarray) – Interpolation grid for the second (y) coordinate of shape [J]. Typically, \(J \gg M\).

  • spline_degree (int) – Spline interpolation degree. Defaults to 1.

Outputs:

z_interp – Interpolated data of shape [L, J].

unstruct(z: numpy.ndarray, x: numpy.ndarray, y: numpy.ndarray, x_interp: numpy.ndarray, y_interp: numpy.ndarray, griddata_method: str = 'linear', **kwargs) numpy.ndarray[source]#

Interpolates unstructured data via Scipy’s interpolate.griddata.

Parameters:
  • z (numpy.ndarray) – Co-domain sample values of shape [N]. Informally, z = f(x, y).

  • x (numpy.ndarray) – First coordinate of the domain sample values of shape [N].

  • y (numpy.ndarray) – Second coordinate of the domain sample values of shape [N].

  • x_interp (numpy.ndarray) – Interpolation grid for the first (x) coordinate of shape [L]. Typically, \(L \gg N\).

  • y_interp (numpy.ndarray) – Interpolation grid for the second (y) coordinate of shape [J]. Typically, \(J \gg N\).

  • griddata_method (str) – Interpolation method (“linear”, “nearest”, “cubic”). See Scipy’s interpolate.griddata for more details. Defaults to “linear”.

Outputs:

z_interp – Interpolated data of shape [L, J].