def crtGauss2D(varSizeX, varSizeY, varPosX, varPosY, varSd):
varSizeX = int(varSizeX)<EOL>varSizeY = int(varSizeY)<EOL>aryY, aryX = sp.mgrid[<NUM_LIT:0>:varSizeX,<EOL><NUM_LIT:0>:varSizeY]<EOL>aryGauss = (<EOL>(np.square((aryX - varPosX)) + np.square((aryY - varPosY))) /<EOL>(<NUM_LIT> * np.square(varSd))<EOL>)<EOL>aryGauss = np.exp(-aryGauss) / (<NUM_LIT:2> * np.pi * np.square(varSd))<EOL>return aryGauss<EOL>
Create 2D Gaussian kernel.

    Parameters
    ----------
    varSizeX : int, positive
        Width of the visual field.
    varSizeY : int, positive
        Height of the visual field..
    varPosX : int, positive
        X position of centre of 2D Gauss.
    varPosY : int, positive
        Y position of centre of 2D Gauss.
    varSd : float, positive
        Standard deviation of 2D Gauss.
    Returns
    -------
    aryGauss : 2d numpy array, shape [varSizeX, varSizeY]
        2d Gaussian.
    Reference
    ---------
    [1]