sainsc.gaussian_kernel

sainsc.gaussian_kernel(bw, radius, *, dtype=np.float32, circular=False)

Generate a 2D Gaussian kernel array.

Parameters:
  • bw (float) – Bandwidth of the Gaussian.

  • radius (int) – Radius of the kernel. Output size will be \(2*radius+1\).

  • dtype (numpy.typing.DTypeLike) – Datatype of the kernel.

  • circular (bool, optional) – Whether to make kernel circular. Values outside radius will be set to 0.

Return type:

ndarray