Skip to content

Commit

Permalink
fix dc term
Browse files Browse the repository at this point in the history
  • Loading branch information
talonchandler committed Oct 2, 2024
1 parent 2b7fd04 commit 902c690
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions waveorder/optics.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ def rotation_matrix(nu_z, nu_y, nu_x, wavelength):

out = torch.stack((row0, row1, row2), dim=0)

# KLUDGE: fix the DC term manually, avoiding nan
out[..., 0, 0] = torch.tensor([[0, 0], [1, 0], [0, 1]])[..., None]

return torch.nan_to_num(out, nan=0.0)


Expand Down

0 comments on commit 902c690

Please sign in to comment.