gaussian_kernel¶
- sofia_redux.scan.utilities.numba_functions.gaussian_kernel(n, sigma)[source]¶
Create a Gaussian convolution kernel.
The Gaussian will be centered on the
n // 2
element with a maximum value of 1 when n is odd. The resultant kernel will be of size n, and be created according to:g_i = exp(-(i - n//2)^2 / 2sigma^2)
where i ranges from 0 to n - 1.
- Parameters:
- nint
Size of the kernel.
- sigmafloat
Gaussian standard deviation.
- Returns:
- kernelnumpy.ndarray (float)
The Gaussian kernel