Mueller.retarder_linear treats CW and CCW rotation equally.

Issue #12 resolved
Simen Martinussen created an issue

Linear retarders based on Mueller.retarder_linear are identical for positive and negative values of R. Specifically, M24, M34, M42 and M43 do not change sign.

This is shown below, together with the Jones matrices for the same rotations, and to control, Mueller matrices derived from the correctly generated Jones matrices.

I believe this to be because utils.put_in_limits(R, “retardance”) sets R to acos(cos(R)) which only preserves the first and second quadrant.

from py_pol.mueller import Mueller, create_Mueller, degrees
from py_pol.jones_matrix import Jones_matrix, create_Jones_matrices

ret = 10*degrees
ang = 40*degrees

Ppos = Mueller("Mueller rotate positive")
Ppos.retarder_linear(R=ret, azimuth=ang)

Pneg = Mueller("Mueller rotate negative")
Pneg.retarder_linear(R=-ret, azimuth=ang)

Jpos = Jones_matrix("Jones rotate positive")
Jpos.retarder_linear(R=ret, azimuth=ang)

Jneg = Jones_matrix("Jones rotate negative")
Jneg.retarder_linear(R=-ret, azimuth=ang)

Ptestpos = Mueller("Control rotate positive")
Ptestpos.from_Jones(Jpos)

Ptestneg = Mueller("Control rotate negative")
Ptestneg.from_Jones(Jneg)

print(Ppos)
print(Pneg)
print(Ppos==Pneg)

print(Jpos)
print(Jneg)
print(Jpos==Jneg)

print(Ptestpos)
print(Ptestneg)
print(Ptestpos==Ptestneg)

Comments (6)

  1. JESUS DEL HOYO MUÑOZ

    Dear simen.

    Thank you for using our software and posting bu reports.

    This is not exactly a bug. In order to have unique values, i.e., different parameters give different elements, retardance should be restricted between 0 and 180º (plus azimuth between 0 and 180º and ellipticity angles between -45º and 45º). Py_pol usually restrict those magnitudes to those intervals. It is true that having more freedom in the creation methods may be useful, but in order to avoid problemsduring the development we took the decision to restrict the magnitudes in all cases. You can see how the restrictions are applied in the function utils.put_in_limits().

    In your particular case, if you want to work with “negative” retardances, you can use the positive retardance and increase the azimuth in 90º (i.e., exchange fast and slow axes).

    I hope this is useful for you. Best regards.

  2. Simen Martinussen reporter

    Dear Jesus,

    Thank you for responding so quickly.

    I don't understand this design choice, for a few reasons:

    First, the behavior is inconsistent. Making Jones and Mueller matrices using the same method and the same arguments creates elements with different physical properties.

    Second, it's unphysical. Retardance can take on any value, and the Mueller matrix for a 350° retarder is not the same as 10°. Transmit linear polarized light, and you will get out elliptical polarized, but with opposite handedness. Right now we don't have unique values: 350° and 10° give the same result. Taking the retardance modulo 360 would make sense, but 180 does not.

    Third, it causes problems with some simulations. In my case, I was simulating a system with a tunable source, and when the retardance was larger than 180° the behavior was unphysical. Your proposed solution would work in principle but it makes parameter sweeps clumsy.

  3. JESUS DEL HOYO MUÑOZ

    I agree that the fleibility would be useful in some applications, and we may remove this restriction in future versions. However, I disagree in the fact that it is unphysical. Having a retardance of 350º and having a retardance of 10º adding 90º to the zimuth renders the same physical result. It is just a matter of definition. We used the book “Polarized ight and the Mueller matrix approach” from J. Gil and R. Ossikowski as guideline and we maintained the same conventions to avoid some other problems. It is a pitty that it is an inconvenience to you.

  4. Claudio Oton

    Dear Jesus,

    Thanks for the library, it is great. I just wanted to mention that not being able to increase the retarder range to 2pi is also an inconvenience for me. I wanted to randomize the retardation phase and I can’t because of this restriction. I know I can do workarounds, like setting two matrices with half of the retardation each, but it would be much cleaner with a single element. Consider this another vote for the expansion of the range of the retarder from pi to 2pi. Other than that, thanks for the great tool!

    Claudio

  5. Log in to comment