kaanaksit / odak

Scientific computing library for optics, computer graphics and visual perception.
https://kaanaksit.com/odak
Mozilla Public License 2.0
177 stars 52 forks source link

Incorrect Kernel Equations in `odak.learn.wave.classical` #97

Closed David-Morales-Norato closed 5 months ago

David-Morales-Norato commented 5 months ago

Hello,

I have been working with the light propagators in your library and noticed a discrepancy in the equations for the kernels of the angular spectrum and Fresnel methods within odak.learn.wave.classical.

Issue Details:

According to "Fourier Optics" by Goodman (2007), the Fresnel transfer function should be as follows:

$H = e^{i \cdot z \cdot k - \pi \lambda z (f_x^2 + f_y^2)}$

Note that there is no square root function because of the small angle approximation.

However, the implemented equation in the library for fresnel kernel is:

$H = e^{i \cdot z \cdot \frac{2\pi}{\lambda} \cdot \sqrt{1 - (\lambda \cdot f_x)^2 - (\lambda \cdot f_y)^2}}$

This equation corresponds to the kernel for the angular spectrum method.

Proposed Solution:

To correct this issue, the equation for the Fresnel transfer function should be updated to match the standard form without the square root, reflecting the small angle approximation. I will make a pull request about it

References:

Thank you for your attention to this matter.

Best regards, David Morales-Norato

kaanaksit commented 5 months ago

I am closing this issue as the pull request is merged. Please do not hesitate to revive it if needed in the future.