I was looking at the mode truncation logic in NeuralOperators.jl and have a question about correctness.
It looks like the code currently only keeps the 1:d slice in each dimension. Since standard FFT outputs place negative low-frequency modes at the end of the array, doesn’t this implementation drop those modes?
According to the FNO paper, we should keep the lowest modes from both ends (e.g., 1:k and (end-k+1):end). Is there a specific reason it’s implemented this way, or is this a bug?
I think the correct way to implement the truncation of higher frequency modes would be to apply fftshift, and then keep the center crop x[center-k:center+k].