Jones_vector.parameters.ellipticity.param() returns nonzero ellipticity for linear polarized light

Issue #13 resolved
Simen Martinussen created an issue

Note that azimuth_ellipticity has the correct value, and that ellipticity_param is correct for 45°.

The problem can be traced to ellipse_axes which should have one value of zero.

S = Jones_vector()
S.circular_light()

P = Jones_matrix("incoupling polarizer")
P.diattenuator_linear(p1=1, p2=0, azimuth=20*degrees)

(P*S).draw_ellipse()
print((P*S).parameters.ellipticity_param())
print((P*S).parameters.azimuth_ellipticity())
print((P*S).parameters.get_all())

result:

0.8390996311772797
(array(2.7925268), array(0.))
{'Ex': (0.6243910008031247+0.22725973883602182j), 'Ey': (0.22725973883602182+0.08271578038342281j), 'E0x': 0.6644630243886747, 'E0y': 0.24184476264797525, 'intensity': 0.5000000000000001, 'norm': 0.7071067811865476, 'irradiance': 0.0009384795227172612, 'alpha': 0.3490658503988659, 'delay': 6.283185307179586, 'azimuth': array(2.7925268), 'ellipticity_angle': array(0.), 'global_phase': 0.3490658503988659, 'a': 0.5416752204197018, 'b': 0.4545194776720435, 'ellipticity_param': 0.8390996311772797, 'eccentricity': 0.5439777651321359, 'degree_circular_polarization': -5.5511151231257815e-17, 'degree_linear_polarization': 1.0}

Comments (4)

  1. JESUS DEL HOYO MUÑOZ

    I have tested your code and the result I obtain is correct. It is possible that you did something in between in your notebook?

  2. Simen Martinussen reporter

    Hi Jesus,

    Very strange. I’ve run it from a clean environment and I get the same output that I showed above.

    I run the code with Python 3.8 in Spyder, in Anaconda. I installed py_pol with ‘pip install py_pol’, and just did a ‘pip install --upgrade --force-reinstall py_pol' with no success. Also manually uninstalled and installed, again through pip. Running version 1.0.5.

  3. JESUS DEL HOYO MUÑOZ

    No idea what can be hppening here. I can tell you we use Python 3.9 installed directly instead of using Anaconda.

  4. Log in to comment