From 3e4a3c0ccc77976e5af3d67e2fa0ea7b1c20cdf9 Mon Sep 17 00:00:00 2001 From: kaanaksit Date: Thu, 16 Jan 2025 13:25:02 +0000 Subject: [PATCH] Cosmetic changes. --- odak/learn/wave/lens.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/odak/learn/wave/lens.py b/odak/learn/wave/lens.py index 1d654a41..78283fb8 100644 --- a/odak/learn/wave/lens.py +++ b/odak/learn/wave/lens.py @@ -25,7 +25,7 @@ def quadratic_phase_function(nx, ny, k, focal=0.4, dx=0.001, offset=[0, 0]): Returns ------- - function : torch.tensor + qpf : torch.tensor Generated quadratic phase function. """ size = [nx, ny] @@ -33,8 +33,8 @@ def quadratic_phase_function(nx, ny, k, focal=0.4, dx=0.001, offset=[0, 0]): y = torch.linspace(-size[1] * dx / 2, size[1] * dx / 2, size[1]) - offset[0] * dx X, Y = torch.meshgrid(x, y, indexing = 'ij') Z = X ** 2 + Y ** 2 - qwf = torch.exp(-0.5j * k / focal * Z) - return qwf + qpf = torch.exp(-0.5j * k / focal * Z) + return qpf def prism_grating(nx, ny, k, angle, dx = 0.001, axis = 'x', phase_offset = 0.):