healpix_convolution.xarray.kernels.gaussian_kernel#
- healpix_convolution.xarray.kernels.gaussian_kernel(cell_ids, sigma, truncate=4.0, kernel_size=None, weights_threshold=None)#
Create a symmetric gaussian kernel for the given cell ids
- Parameters:
cell_ids (
xarray.DataArray) – The cell ids. Must be valid according to xdggs.sigma (
float) – The standard deviation of the gaussian function in radians.truncate (
float, default:4.0) – Truncate the kernel after this many multiples ofsigma.kernel_size (
int, optional) – If given, will be used instead oftruncateto determine the size of the kernel.weights_threshold (
float, optional) – If given, drop all kernel weights whose absolute value is smaller than this threshold.
- Returns:
kernel (
xarray.DataArray) – The kernel as a sparse matrix.