Aug-09-2021, 09:59 AM
I am confused about the correct ordering of indices after taking an fft down the columns of a matrix.
If I have 2D data in the matrix psi_hat_kxt and I take its FFT down columns and FFT-shift the result, np.fft.fftshift(np.fft.fft(psi_hat_kxt, axis=0)),
where are the negative frequencies located? Shouldn't they be in the top half of the resulting array? If so, when I plot the result (squared element-wise to get real data) using imshow, is there an implicit up-down flip somewhere?
The full context is in my stackoverflow question here.
If I have 2D data in the matrix psi_hat_kxt and I take its FFT down columns and FFT-shift the result, np.fft.fftshift(np.fft.fft(psi_hat_kxt, axis=0)),
where are the negative frequencies located? Shouldn't they be in the top half of the resulting array? If so, when I plot the result (squared element-wise to get real data) using imshow, is there an implicit up-down flip somewhere?
The full context is in my stackoverflow question here.