Skip to content

Commit

Permalink
uncommented test
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjim21 committed Aug 16, 2024
1 parent 3e4b813 commit 7d0139f
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions tests/test_mueller.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,24 +390,23 @@ def test_decompose_retarder_jax():

assert np.allclose(Mr, qwp, atol=1e-12)

#TODO need to investigate jax calculation of eigenvalues
# @pytest.mark.skipif(jax_installed is False, reason='jax not found')
# def test_decompose_depolarizer_jax():

# # make a horizontal polarizer
# hpol = linear_diattenuator(0, 0.1)
# qwp = linear_retarder(np.pi/4,np.pi/2)

# depol = np.array([[1., 0., 0., 0.],
# [0., 0.9, 0., 0.],
# [0., 0., 0.8, 0.],
# [0., 0., 0., 0.7]])
@pytest.mark.skipif(jax_installed is False, reason='jax not found')
def test_decompose_depolarizer_jax():

# make a horizontal polarizer
hpol = linear_diattenuator(0, 0.1)
qwp = linear_retarder(np.pi/4,np.pi/2)

depol = np.array([[1., 0., 0., 0.],
[0., 0.9, 0., 0.],
[0., 0., 0.8, 0.],
[0., 0., 0., 0.7]])

# Mtot = depol @ qwp @ hpol
Mtot = depol @ qwp @ hpol

# Md = decompose_depolarizer(Mtot)
Md = decompose_depolarizer(Mtot)

# assert np.allclose(Md, depol, atol=1e-12)
assert np.allclose(Md, depol, atol=1e-12)

@pytest.mark.skipif(jax_installed is False, reason='jax not found')
def test_mueller_to_jones_jax():
Expand Down

0 comments on commit 7d0139f

Please sign in to comment.