dsf.utils.interpolators module

Interpolation scripts for Delta Sigma calculations.

dsf.utils.interpolators.interpolate_linear(x, xp, fp, *, x_name='x', xp_name='xp', fp_name='fp')[source]

Interpolate a 1D function linearly between tabulated points.

Parameters:
  • x (NDArray[float64]) – requested interpolation points of the independent variable.

  • xp (NDArray[float64]) – tabulated points of the independent variable.

  • fp (NDArray[float64]) – tabulated points of the dependent variable.

  • x_name (str) – Name of the independent variable for error messages.

  • xp_name (str) – Name of the independent variable grid for error messages.

  • fp_name (str) – Name of the dependent variable grid for error messages.

Returns:

Interpolated values of the dependent variable at the requested points.

Return type:

NDArray[float64]

dsf.utils.interpolators.interpolate_loglog(x, xp, fp, *, x_name='x', xp_name='xp', fp_name='fp')[source]

Interpolate a 1D function on a log-log scale between tabulated points.

Parameters:
  • x (NDArray[float64]) – requested interpolation points of the independent variable.

  • xp (NDArray[float64]) – tabulated points of the independent variable.

  • fp (NDArray[float64]) – tabulated points of the dependent variable.

  • x_name (str) – Name of the independent variable for error messages.

  • xp_name (str) – Name of the independent variable grid for error messages.

  • fp_name (str) – Name of the dependent variable grid for error messages.

Returns:

Interpolated values of the dependent variable at the requested points.

Return type:

NDArray[float64]