79745798

Date: 2025-08-25 13:13:42
Score: 0.5
Natty:
Report link

The problem is actually not in the filter, but in the size of the propagation step. In this case, it is too small, which means that the fft is being computed too many times and thus generating error. By increasing the step size to 0.001, you get way better results:

enter image description here

You can prove that these results are better by introducing a function that measures pixel distance between arrays:

def distance(a: array,b: array):
    return np.dot((a-b).flatten(),(a-b).flatten())/len(a.flatten())  

Using this function to compare the propagated profile to the analytical one shows a distance of 1.40-0.33j when dz=0.001, whereas the distance is -2.53+22.25j when dz=0.00005. You can play around with dz to see if you can get better results.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Henrique Guerra