I was making a plot to show side lobes for different spectral windows and I noticed if I take a simple fft of a rectangle window, I don't see any side lobes. I think I'm just making a simple mistake.
Here is the Python code I ran:
from matplotlib import pyplot as plt import numpy as np fAxis = np.linspace(-1/2,1/2,100) rect = np.ones( 100 ) specWindow = abs(np.fft.fftshift(np.fft.fft(rect))) plt.plot(specWindow) plt.show()
Could anyone explain how to change my code slightly to see the side lobes I'd expect. I expect a discrete FT of a rectangle function to give me the Dirichlet kernel.