Skip to content

Commit

Permalink
Cosmetic changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaanaksit committed Jan 16, 2025
1 parent d49bb18 commit 3e4a3c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions odak/learn/wave/lens.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ 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]
x = torch.linspace(-size[0] * dx / 2, size[0] * dx / 2, size[0]) - offset[1] * dx
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.):
Expand Down

0 comments on commit 3e4a3c0

Please sign in to comment.