code: def circular_gaussian_kernel(sd,radius):
      
      i,j = np.mgrid[-radius:radius+1,-radius:radius+1].astype(float) / radius
      mask = i**2 + j**2 <= 1
      i = i * radius / sd
      j = j * radius / sd
  
      kernel = np.zeros((2*radius+1,2*radius+1))
      kernel[mask] = np.e ** (-(i[mask]**2+j[mask]**2) /
                              (2 * sd **2))
      #
      # Normalize the kernel so that there is no net effect on a uniform image
      #
      kernel = kernel / np.sum(kernel)
      return kernel
docs: Create a 2-d Gaussian convolution kernel
      
      sd     - standard deviation of the gaussian in pixels
      radius - build a circular kernel that convolves all points in the circle
               bounded by this radius