Skip to content

Commit

Permalink
Merge pull request #29 from Jashcraf/25-investigate-margin-of-error-f…
Browse files Browse the repository at this point in the history
…or-decompose_depolarizer-with-jax

25 investigate margin of error for decompose depolarizer with jax
  • Loading branch information
Jashcraf authored Oct 22, 2024
2 parents ae2e064 + e4f411f commit 8537309
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
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

0 comments on commit 8537309

Please sign in to comment.