This line in convolution_propagation.py is supposed to set the transfer function to be zero at all nonphysical spatial frequencies. But we previously set the root variable equal to zero wherever it is negative (that is, wherever taking sqrt(root) would result in an imaginary value). So the line g = g * (root >= 0) will not actually do anything! The transfer function remains unchanged because root >= 0 everywhere, and at the points where root = 0, the transfer function will be equal to 1, which is incorrect. This line should read g = g * (root > 0) instead.
Need to fix and include a test against known transfer functions.
This line in convolution_propagation.py is supposed to set the transfer function to be zero at all nonphysical spatial frequencies. But we previously set the
rootvariable equal to zero wherever it is negative (that is, wherever takingsqrt(root)would result in an imaginary value). So the lineg = g * (root >= 0)will not actually do anything! The transfer function remains unchanged becauseroot >= 0everywhere, and at the points whereroot = 0, the transfer function will be equal to 1, which is incorrect. This line should readg = g * (root > 0)instead.Need to fix and include a test against known transfer functions.