Ejemplo 1

In [5]:
from py_pol.jones_vector import Jones_vector
from py_pol.jones_matrix import Jones_matrix
from py_pol.utils import degrees

j0 = Jones_vector("j0")
j0.linear_light(angle=45*degrees)

m0 = Jones_matrix("m0")
m0.diattenuator_linear( p1=0.75, p2=0.25, angle=45*degrees)

m1 = Jones_matrix("m1")
m1.quarter_wave(angle=0 * degrees)

j1=m1*m0*j0

print(j1)
m1 * m0 @45.00 deg * j0 = [(0.5303+0j); 0.5303j]'
In [8]:
print(j0,'\n')
print(j0.parameters)
j0 = [0.7071; 0.7071]' 

parameters of j0:
    intensity        : 1.000 arb.u
    alpha            : 45.000 deg
    delay            : 0.000 deg
    azimuth          : 45.000 deg
    ellipticity angle: 0.000 deg
    a, b             : 1.000  0.000
    phase            : 0.000 deg

In [9]:
print(j1,'\n')
print(j1.parameters)
m1 * m0 @45.00 deg * j0 = [(0.5303+0j); 0.5303j]' 

parameters of m1 * m0 @45.00 deg * j0:
    intensity        : 0.562 arb.u
    alpha            : 45.000 deg
    delay            : 90.000 deg
    azimuth          : 8.618 deg
    ellipticity angle: -45.000 deg
    a, b             : 0.530  0.530
    phase            : 0.000 deg

In [10]:
print(m0,'\n')
print(m0.parameters)
m0 @45.00 deg = 
      [+0.500, +0.250]
      [+0.250, +0.500] 

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-10-2f8e85c412ae> in <module>
      1 print(m0,'\n')
----> 2 print(m0.parameters)

~/.local/lib/python3.7/site-packages/py_pol/jones_matrix.py in __repr__(self)
    795     def __repr__(self):
    796         """Print all parameters."""
--> 797         self.get_all()
    798         text = "parameters of {}:\n".format(self.name)
    799         text = text + "    is_homogeneous: {0:}\n".format(

~/.local/lib/python3.7/site-packages/py_pol/jones_matrix.py in get_all(self)
    812             (dict): Dictionary with parameters of Jones Matrix.
    813         """
--> 814         self.dict_params['delay'] = self.delay()
    815         self.dict_params['diattenuation'] = self.diattenuation()
    816         self.dict_params['is_homogeneous'] = self.is_homogeneous()

AttributeError: 'Parameters_Jones_Matrix' object has no attribute 'delay'
In [11]:
print(m1,'\n')
print(m1.parameters)
m1 = 
      [+1+0j, +0+0j]
      [+0+0j, +0+1j] 

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-11-833c1de50358> in <module>
      1 print(m1,'\n')
----> 2 print(m1.parameters)

~/.local/lib/python3.7/site-packages/py_pol/jones_matrix.py in __repr__(self)
    795     def __repr__(self):
    796         """Print all parameters."""
--> 797         self.get_all()
    798         text = "parameters of {}:\n".format(self.name)
    799         text = text + "    is_homogeneous: {0:}\n".format(

~/.local/lib/python3.7/site-packages/py_pol/jones_matrix.py in get_all(self)
    812             (dict): Dictionary with parameters of Jones Matrix.
    813         """
--> 814         self.dict_params['delay'] = self.delay()
    815         self.dict_params['diattenuation'] = self.diattenuation()
    816         self.dict_params['is_homogeneous'] = self.is_homogeneous()

AttributeError: 'Parameters_Jones_Matrix' object has no attribute 'delay'

Ejemplo 2

In [19]:
from py_pol.stokes import Stokes
from py_pol.mueller import Mueller
from py_pol.utils import degrees

j0 = Stokes("j0")
j0.linear_light(angle=45*degrees)

m1 = Mueller("m1")
m1.diattenuator_linear(p1=1, p2=0, angle=0*degrees)

j1=m1*j0
In [20]:
i1=j0.parameters.intensity()
print("intensity = {:4.3f} arb. u.".format(i1))
intensity = 1.000 arb. u.
In [15]:
print(j0,'\n')
print(j0.parameters)
j0 = [ +1;  +0;  +1;  +0]
 

parameters of j0:
    intensity             : 1.000 arb. u.
    amplitudes            : E0x 0.707, E0y 0.707, E0_unpol 0.000 
    degree polarization   : 1.000
    degree linear pol.    : 1.000
    degree   circular pol.: 0.000
    alpha                 : 45.000 deg
    delay                 : 0.000 deg
    azimuth               : 45.000 deg
    ellipticity  angle    : 0.000 deg
    ellipticity  param    : 0.000
    eccentricity          : 1.000
    polarized vector      : [+1.000; +0.000; +1.000; +0.000]'
    unpolarized vector    : [+0.000; +0.000; +0.000; +0.000]'

In [16]:
print(j1,'\n')
print(j1.parameters)
m1 * j0 = [+0.500; +0.500; +0.000; +0.000]
 

parameters of m1 * j0:
    intensity             : 0.500 arb. u.
    amplitudes            : E0x 0.707, E0y 0.000, E0_unpol 0.000 
    degree polarization   : 1.000
    degree linear pol.    : 1.000
    degree   circular pol.: 0.000
    alpha                 : 0.000 deg
    delay                 : 0.000 deg
    azimuth               : 0.000 deg
    ellipticity  angle    : 0.000 deg
    ellipticity  param    : 0.000
    eccentricity          : 1.000
    polarized vector      : [+0.500; +0.500; +0.000; +0.000]'
    unpolarized vector    : [+0.000; +0.000; +0.000; +0.000]'

In [17]:
print(m1,'\n')
print(m1.parameters)
m1 = 
  [+0.5000, +0.5000, +0.0000, +0.0000]
  [+0.5000, +0.5000, +0.0000, +0.0000]
  [+0.0000, +0.0000, +0.0000, +0.0000]
  [+0.0000, +0.0000, +0.0000, +0.0000]
 

parameters:
    
In [18]:
print(j1)
print(j1.parameters)
m1 * j0 = [+0.500; +0.500; +0.000; +0.000]

parameters of m1 * j0:
    intensity             : 0.500 arb. u.
    amplitudes            : E0x 0.707, E0y 0.000, E0_unpol 0.000 
    degree polarization   : 1.000
    degree linear pol.    : 1.000
    degree   circular pol.: 0.000
    alpha                 : 0.000 deg
    delay                 : 0.000 deg
    azimuth               : 0.000 deg
    ellipticity  angle    : 0.000 deg
    ellipticity  param    : 0.000
    eccentricity          : 1.000
    polarized vector      : [+0.500; +0.500; +0.000; +0.000]'
    unpolarized vector    : [+0.000; +0.000; +0.000; +0.000]'

In [ ]: