sainsc.LazyKDE.gaussian_kernel ============================== .. py:method:: sainsc.LazyKDE.gaussian_kernel(bw, *, unit = 'px', truncate = 2, circular = False) Set the kernel used for kernel density estimation (KDE) to gaussian. :param bw: Bandwidth of the kernel. :type bw: float :param unit: Which unit the bandwidth of the kernel is defined in: 'px' or 'um'. 'um' requires :py:attr:`sainsc.LazyKDE.resolution` to be set correctly. :type unit: str :param truncate: The radius for calculating the KDE is calculated as `bw` * `truncate`. Refer to :py:func:`scipy.ndimage.gaussian_filter`. :type truncate: float, optional :param circular: If `True` calculate the KDE using a circular kernel instead of square by setting all values outside the radius `bw` * `truncate` to 0. :type circular: bool, optional :raises ValueError: If `unit` is neither 'px' nor 'um'. :raises ValueError: If `unit` is 'um' but `resolution` is not set. .. seealso:: :py:meth:`sainsc.LazyKDE.kde`