Skip to content

Transfer function in propagation appears to be incorrect #453

@vnmanoharan

Description

@vnmanoharan

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions