colour.kernel_sinc#

colour.kernel_sinc(x: ArrayLike, a: float = 3) NDArrayFloat[source]#

Evaluate the sinc kernel at specified sample positions.

Compute the sinc kernel function, commonly used in signal processing and interpolation applications, for the specified sample positions.

Parameters:
  • x (ArrayLike) – Sample positions at which to evaluate the sinc kernel.

  • a (float) – Size parameter of the sinc kernel, controlling the function’s support width.

Returns:

Sinc kernel values evaluated at the specified sample positions.

Return type:

numpy.ndarray

Raises:

AssertionError – If a is less than 1.

References

[BB09]

Examples

>>> kernel_sinc(np.linspace(0, 1, 10))
array([1.00000000e+00, 9.7981553...e-01, 9.2072542...e-01, 8.2699334...e-01,
       7.0531659...e-01, 5.6425327...e-01, 4.1349667...e-01, 2.6306440...e-01,
       1.2247694...e-01, 3.8981718...e-17])