You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I was interested in learning Julia after some persistent persuasion and decided to add a little bit to this package as a first pass because I too exist in Mueller calculus.
Specifically, I’m trying to add the depolarizing decomposition of a Mueller matrix so that you can analytically separate out the Depolarizer, Retarder, and Diattenuator from a single Mueller matrix.
For the time being, here’s the Diattenuator function
using LinearAlgebra
functiondecompose_diattenuator(M)
T = M[1, 1]
diattenuation_vector = M[1, 2:4] / T
D =sqrt(dot(diattenuation_vector, diattenuation_vector))
mD =sqrt(1- D^2)
diattenuation_norm = diattenuation_vector # / mD
DD =kron(diattenuation_vector, transpose(diattenuation_vector))
# Create the diattenuator
I =diagm([1., 1., 1.])
inner_diattenuator = (I * mD) + (1- mD) * DD
# Put it all together
Md =zeros(4, 4)
Md[1, 1] =1.
Md[1, 2:4] = diattenuation_vector
Md[2:4, 1] = diattenuation_vector
Md[2:4, 2:4] = inner_diattenuator
Md = Md * T
return Md
end
Does this sound like it would be a useful inclusion to Mueller.jl? If so, I can get started on a PR
The text was updated successfully, but these errors were encountered:
Jashcraf
changed the title
Adding depolarizing decomposition - general diattenuator / retarder support?
Adding depolarizing decomposition
Sep 20, 2024
Hello! I was interested in learning Julia after some persistent persuasion and decided to add a little bit to this package as a first pass because I too exist in Mueller calculus.
Specifically, I’m trying to add the depolarizing decomposition of a Mueller matrix so that you can analytically separate out the Depolarizer, Retarder, and Diattenuator from a single Mueller matrix.
For the time being, here’s the Diattenuator function
Does this sound like it would be a useful inclusion to Mueller.jl? If so, I can get started on a PR
The text was updated successfully, but these errors were encountered: