Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

25 investigate margin of error for decompose depolarizer with jax #29

Merged
5 changes: 3 additions & 2 deletions katsu/katsu_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ def set_backend_to_cupy():

def set_backend_to_jax():
"""Convenience method to automatically configure katsu's backend to jax."""
import jax.numpy as jnp
import jax as jax

np._srcmodule = jnp
jax.config.update("jax_enable_x64", True)
np._srcmodule = jax.numpy

return

Expand Down
4 changes: 2 additions & 2 deletions katsu/mueller.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def decompose_retarder(M, return_all=False, normalize=False):
Whether to return the retarder and diattenuator vs just the retarder.
Defaults to False, which returns both

Returns
Returns
-------
numpy.ndarray
Retarder component of mueller matrix
Expand All @@ -625,7 +625,7 @@ def decompose_retarder(M, return_all=False, normalize=False):
Mr = M @ np.linalg.inv(Md)

if normalize:
Mr = Mr/np.max(np.abs(Mr))
Mr = Mr/np.max(np.abs(Mr))
else:
Mr = Mr

Expand Down
2 changes: 1 addition & 1 deletion paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ authors:
- name: Manxuan Zhang
orcid: 0000-0003-3567-6839
affiliation: 3
- name: Kenji Mulhal
- name: Kenji Mulhall
affiliation: 4
- name: Ramya M. Anche
orcid: 0000-0002-4989-6253
Expand Down
Loading