Skip to content

Conversation

@BenHafner
Copy link

Changed g = g*(root >= 0) to g = g*(root > 0). The point of this line is to mask out the spatial frequencies greater than 1/wavelength, which don't make sense physically. These are the frequencies where root is negative. But a few lines earlier there was this line: root *= (root >= 0) which already turned all the negative values of root into zero. So multiplying g by (root > 0) instead of (root >= 0) is required to properly mask out the points where root = 0 (the points where root was originally negative).

I can work on also writing a test function to check if there are any other issues with reconstruction, but for now I just changed that one line.

Changed mask function from (root >= 0) to (root > 0) so it returns False when root = 0. (A few lines earlier, root was set to zero at frequencies greater than 1/wavelength, which we're trying to mask out because they aren't realistic, so the mask function should return False when root = 0)
Update convolution_propagation.py
@vnmanoharan vnmanoharan linked an issue Oct 23, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transfer function in propagation appears to be incorrect

1 participant