I would like to numerically observe the rotation property of the Fourier transform. I believe that it is not possible since the rotation property is for the continuous transform and the DFT introduces an aliasing problem due to imperfect sampling of the input and also has a circular nature.
From the rotation property, for a rotation $\mathcal T$, $\mathcal T\mathcal F f = \mathcal F \mathcal T f$. Thus, if $f$ is symmetric to $\mathcal T$, i.e., $\mathcal T f = f$, then the rotation property implies that the transform of $f$ is symmetric to $\mathcal T$ as well, i.e., $\mathcal T\mathcal F f = \mathcal F f$.
Further, if $f$ is real, it's transform $\mathcal F f$ will be Hermitian, and along with the rotation property, this implies that $\mathcal F f$ will be real-valued, e.g., the Gaussian function (proof sketch below).
However, neither of these properties are apparent numerically, presumably due to the previously mentioned issues. Here, I am choosing $\mathcal T$ to be a $90^\circ$ rotation.
import numpy as np
np.random.seed(1)
f = np.random.randn(5, 5)
f = sum([np.rot90(f, k=k) for k in range(4)])
f.round(1)
Out[2]:
array([[ 2.3, -1.5, 3. , -1.6, 2.3],
[-1.6, 1.9, -4.1, 1.9, -1.5],
[ 3. , -4.1, -1.3, -4.1, 3. ],
[-1.5, 1.9, -4.1, 1.9, -1.6],
[ 2.3, -1.6, 3. , -1.5, 2.3]])
np.fft.fftshift(np.fft.fft2(f)).round(1)
Out[3]:
array([[-19.9-14.5j, -2.7 -8.2j, 1.4 -4.4j, 7.7 -5.6j, 24.6 +0.j ],
[ -2.9 -9.1j, -1.9 +5.8j, 10.3 -7.5j, -6.1 +0.j , 6.9 +5.j ],
[ 1.4 -4.4j, 10.3 -7.5j, -1.3 +0.j , 10.3 +7.5j, 1.4 +4.4j],
[ 6.9 -5.j , -6.1 +0.j , 10.3 +7.5j, -1.9 -5.8j, -2.9 +9.1j],
[ 24.6 -0.j , 7.7 +5.6j, 1.4 +4.4j, -2.7 +8.2j, -19.9+14.5j]])
I also tried adding a large amount of 0 padding to see if either of these properties begins to become apparent on a "less" finite domain to try and mitigate the circular nature of the transform:
f = np.pad(f, (10000, 10000))
sum([np.abs(f - np.rot90(f, k=k)) for k in range(4)]).sum() # still symmetric
Out[4]: 5.329070518200751e-15
F = np.fft.fftshift(np.fft.fft2(f))
np.abs(np.rot90(F) - F).mean() # not symmetric
Out[5]: 12.827504372261783
np.abs(F.imag).mean() # imaginary part not 0
Out[6]: 4.852261405894498
Finally, I tried with the radially symmetric Gaussian function.
import numpy as np
x = np.concatenate([x[None] for x in np.meshgrid(*[np.linspace(-10, 10, 10000)] * 2)])
y = np.exp(-np.linalg.norm(x, axis=0))
np.abs(y - np.rot90(y)).sum() # symmetric
Out[2]: 2.091662961614887e-10
Y = np.fft.fftshift(np.fft.fft2(y))
np.abs(Y - np.rot90(Y)).mean() # not symmetric
Out[3]: 1.9977764482822713
np.abs(Y.imag).mean() # imaginary part not 0
Out[4]: 0.006017917416468471
Is it possible to numerically observe the desired results?
Sketch: If $h:\mathbb R^2\to\mathbb C$ is Hermitian and symmetric to rotations, then it is real-valued (i.e., imaginary part is $0$).
Since $h$ is symmetric to rotations, $h(x,y) = h(-x, -y)$, which implies that $\Im h(x,y)=\Im h(-x,-y)$, where $h=\Re h + i\Im h$.
Next, since $h$ is Hermitian, $\Im h(x,y)=-\Im h(-x,-y)$. Thus, $\Im h(-x,-y) = -\Im h(-x,-y)=0$, and so $\Im h(x,y)=0$