def makeGaussian(size, fwhm=3, center=None):
    """ Make a square gaussian kernel.
    size is the length of a side of the square
    fwhm is full-width-half-maximum, which
    can be thought of as an effective radius.
    """
x = np.arange(0, size, 1, float)
y = x[:, (np.newaxis)]
if center is None:
    x0 = y0 = size // 2
else:
    x0 = center[0]
y0 = center[1]
Как сгенерировать 2D-гаусс с помощью Python?