I could create a white rectangle (square) window in a black meshgrid using the following piece of code:
import numpy as np
import pylab as plt
x = np.zeros(127)
y = np.zeros(127)
x[50:70] = 1
y[50:70] = 1
X, Y = np.meshgrid(x, y)
grating = X*Y
plt.imshow(X*Y)
Utilizing a similar idea, how to plot a circle at the center with some radius?