You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While writing a 1D variant of this, I noticed that the _centered function ends up grabbing the ends of the filtered array (i.e. all the padding) because we never shifted the origin... but maybe numpy's 2D fft has a different convention?
I think we are missing an ifftshift in the adjoint filter code
I do not think fftshift or ifftshift is missing. Here the kernel is padded with zeros at the center, in contrast to the previous case (before PR #2016) where the kernel is padded with zeros at ends.
While writing a 1D variant of this, I noticed that the _centered function ends up grabbing the ends of the filtered array (i.e. all the padding) because we never shifted the origin... but maybe numpy's 2D fft has a different convention?
Are you referring to the case before or after PR #2016? After PR #2016, the 1d variant was used, but fftshift or ifftshift was not used. Before PR #2016, the 1d variant was not used, but fftshift was used.
I think we are missing an
ifftshift
in the adjoint filter code:meep/python/adjoint/filters.py
Lines 99 to 106 in 6abb8b3
per the discussion we had awhile back.
While writing a 1D variant of this, I noticed that the
_centered
function ends up grabbing the ends of the filtered array (i.e. all the padding) because we never shifted the origin... but maybe numpy's 2D fft has a different convention?(cc @mawc2019, @mochen4)
The text was updated successfully, but these errors were encountered: