py-pol


Namepy-pol JSON
Version 1.1.3 PyPI version JSON
download
home_pagehttps://bitbucket.org/optbrea/py_pol/src/master/
SummaryJones and Mueller polarization - Optics
upload_time2023-09-06 14:43:33
maintainer
docs_urlNone
authorJesus del Hoyo Munoz / Luis Miguel Sanchez Brea
requires_python
licenseMIT license
keywords py_pol optics polarization jones stokes mueller
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ========================
Python polarization
========================


.. image:: https://img.shields.io/pypi/v/py_pol.svg
        :target: https://pypi.org/project/py-pol/

.. image:: https://img.shields.io/travis/optbrea/py_pol.svg
        :target: https://bitbucket.org/optbrea/py_pol/src/master/

.. image:: https://readthedocs.org/projects/py-pol/badge/?version=latest
        :target: https://py-pol.readthedocs.io/en/master/
        :alt: Documentation Status



* Free software: MIT license
* Documentation: https://py-pol.readthedocs.io

.. image:: logo.png
   :width: 75
   :align: right



Features
--------
Py-pol is a Python library for Jones and Stokes-Mueller polarization optics. It has 4 main modules:

    * jones_vector - Light polarization states in Jones formalism (2x1 vectors).

    * jones_matrix - Optical elements polarization properties in Jones formalism (2x2 matrices).

    * stokes - Light polarization states in Mueller-Stokes formalism (4x1 vectors).

    * mueller - Optical elements polarization properties in Mueller-Stokes formalism (4x4 matrices).


Each one has its own class, with multiple methods for generation, operation and parameters extraction.

Examples
--------

Jones formalism
===============

Generating Jones vectors and Matrices

.. code-block:: python

    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_waveplate(angle=0 * degrees)

    j1=m1*m0*j0

Extracting information form Jones Vector.

.. code-block:: python

    print(j0,'\n')
    print(j0.parameters)

.. code-block:: python

    j0 = [+0.707; +0.707]

    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

.. code-block:: python

    print(j1,'\n')
    print(j1.parameters)

.. code-block:: python

        m1 * m0 @45.00 deg * j0 = [+0.530+0.000j; +0.000+0.530j]'

        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

Extracting information form Jones Matrices.

.. code-block:: python

    print(m0,'\n')
    print(m0.parameters)

.. code-block:: python

        m0 @45.00 deg =
              [+0.500, +0.250]
              [+0.250, +0.500]

        parameters of m0 @45.00 deg:
            is_homogeneous: True
            delay:          0.000 deg
            diattenuation:  0.800


.. code-block:: python


    print(m1,'\n')
    print(m1.parameters)


.. code-block:: python


        m1 =
              [+1+0j, +0+0j]
              [+0+0j, +0+1j]

        parameters of m1:
            is_homogeneous: True
            delay:          90.000 deg
            diattenuation:  0.000




Stokes-Mueller formalism
========================

Generating Stokes vectors and Mueller matrices.


.. code-block:: python


    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


Extracting information from Stokes vectors.

Determining the intensity of a Stokes vector:

.. code-block:: python

    i1=j0.parameters.intensity()
    print("intensity = {:4.3f} arb. u.".format(i1))


.. code-block:: python

    intensity = 1.000 arb. u.

Determining all the parameters of a Stokes vector:

.. code-block:: python


    print(j0,'\n')
    print(j0.parameters)

.. code-block:: python

        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]'

.. code-block:: python


    print(j1,'\n')
    print(j1.parameters)

.. code-block:: python

        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]'




Extracting information from Mueller matrices.

.. code-block:: python

    m2 = Mueller("m2")
    m2.diattenuator_retarder_linear(D=90*degrees, p1=1, p2=0.5, angle=0)
    delay = m2.parameters.retardance()
    print("delay = {:2.1f}º".format(delay/degrees))

.. code-block:: python

    delay = 90.0º

There is a function in Parameters_Jones_Vector class, .get_all() that will compute all the parameters available and stores in a dictionary .dict_params(). Info about dict parameters can be revised using the print function.


.. code-block:: python

    print(m2,'\n')
    m2.parameters.get_all()
    print(m2.parameters)


.. code-block:: python

        m2 =
          [+0.6250, +0.3750, +0.0000, +0.0000]
          [+0.3750, +0.6250, +0.0000, +0.0000]
          [+0.0000, +0.0000, +0.0000, +0.5000]
          [+0.0000, +0.0000, -0.5000, +0.0000]

      Parameters of m2:
          Transmissions:
              - Mean                  : 62.5 %.
              - Maximum               : 100.0 %.
              - Minimum               : 25.0 %.
          Diattenuation:
              - Total                 : 0.600.
              - Linear                : 0.600.
              - Circular              : 0.000.
          Polarizance:
              - Total                 : 0.600.
              - Linear                : 0.600.
              - Circular              : 0.000.
          Spheric purity              : 0.872.
          Retardance                  : 1.571.
          Polarimetric purity         : 1.000.
          Depolarization degree       : 0.000.
          Depolarization factors:
              - Euclidean distance    : 1.732.
              - Depolarization factor : 0.000.
          Polarimetric purity indices:
              - P1                    : 1.000.
              - P2                    : 1.000.
              - P3                    : 1.000.

There are many types of Mueller matrices. The Check_Mueller calss implements all the checks that can be performed in order to clasify a Mueller matrix. They are stored in the checks field of Mueller class.


.. code-block:: python

    m1 = Mueller("m1")
    m1.diattenuator_linear(p1=1, p2=0.2, angle=0*degrees)
    print(m1,'\n')

    c1 = m1.checks.is_physical()
    c2 = m1.checks.is_homogeneous()
    c3 = m1.checks.is_retarder()
    print('The linear diattenuator is physical: {}; hogeneous: {}; and a retarder: {}.'.format(c1, c2, c3))


.. code-block:: python

    m1 =
      [+0.520, +0.480, +0.000, +0.000]
      [+0.480, +0.520, +0.000, +0.000]
      [+0.000, +0.000, +0.200, +0.000]
      [+0.000, +0.000, +0.000, +0.200]


    The linear diattenuator is physical: True; hogeneous: True; and a retarder: False.

Drawings
========

The modules also allows to obtain graphical representation of polarization.

Drawing polarization ellipse for Jones vectors.

.. image:: ellipse_Jones_1.png
   :width: 600

.. image:: ellipse_Jones_3.png
   :width: 600


Drawing polarization ellipse for Stokes vectors with random distribution due to unpolarized part of light.

.. image:: ellipse_Stokes_1.png
   :width: 600

.. image:: ellipse_Stokes_2.png
   :width: 600

Drawing Stokes vectors in Poincare sphere.

.. image:: poincare2.png
   :width: 600

.. image:: poincare3.png
   :width: 600

.. image:: poincare4.png
   :width: 600


Authors
-------
.. image:: logoUCM.png
   :width: 125
   :align: right

* Jesus del Hoyo <jhoyo@ucm.es>
* Luis Miguel Sanchez Brea <optbrea@ucm.es>

    **Universidad Complutense de Madrid**,
    Faculty of Physical Sciences,
    Department of Optics
    Plaza de las ciencias 1,
    ES-28040 Madrid (Spain)

Citing
------
* J. Hoyo, L. M. Sanchez-Brea, A. Soria-Garcia, "Open source library for polarimetric calculations "py_pol"", Proc. SPIE 11875, Computational Optics 2021, 1187506 (14 September 2021); doi: 10.1117/12.2597163, https://spie.org/Publications/Proceedings/Paper/10.1117/12.2597163?SSO=1.
* J. del Hoyo, L.M. Sanchez Brea, "py-pol, Python module for polarization optics", https://pypi.org/project/py-pol/ (2019)

References
----------

* D. Goldstein "Polarized light" 2nd edition, Marcel Dekker (1993).

* J. J. Gil, R. Ossikovsky "Polarized light and the Mueller Matrix approach", CRC Press (2016).

* C. Brosseau "Fundamentals of Polarized Light" Wiley (1998).

* R. Martinez-Herrero, P. M. Mejias, G. Piquero "Characterization of partially polarized light fields" Springer series in Optical sciences (2009).

* J. M. Bennet "Handbook of Optics 1" Chapter 5 'Polarization'.

* R. A. Chipman "Handbook of Optics 2" Chapter 2 'Polarimetry'.

* S. Y. Lu and RA Chipman, "Homogeneous and inhomogeneous Jones matrices",  J. Opt. Soc. Am. A 11(2) 766 (1994).




Acknowlegments
--------------
This software was initially developed for the project Retos-Colaboración 2016 "Ecograb" (RTC-2016-5277-5) and "Teluro-AEI" (RTC2019-007113-3) of Ministerio de Economía y Competitivdad (Spain) and the European funds for regional development (EU), led by Luis Miguel Sanchez-Brea.


Credits
-------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

1.1.3
-----------------------
* bugfix zeroslike
* bugfix not taking shape = False as flatten the object.

1.1.2
-----------------------
* bugfix Jones_vector.parameters.global_phase

1.1.1
-----------------------
* from_list can also be used with lists of Py_pol objects, lists and tuples. Also, all elemeents may have more than one elemnt.
* minor bugfixes


1.1.0 (2022-3-31)
-------------------
* Added base class Py_pol
* Objects are now iterable
* 3D drawings changed to Plotly
* New density and existence methods


1.0.4 (2022-02-07)
------------------
* Bug fix related to variable limits

1.0.4 (2021-07-19)
------------------
* Bug fixes


1.0.3 (2021-01-22)
------------------
* Bug fixes


1.0.2 (2020-07-04)
--------------------
* Implemented workaround of axis_equal issue.


1.0.0 (2020-06-04)
-------------------
py_pol multidimensional. Alpha state

This is a big overhaul with many changes. All of them are based on the possibility of storing several vector/matrices in the same object. This reduces significantly the time required to perform the same operation to multiple vectors/matrices, using numpy methods instead of for loops. We have calculated that the reduction is around one order of magnitude.

New methods have been introduced. First, methods available for Mueller / Stoes modules have been created also for Jones (when possible). Also, some bugs and errors in the calculations have been solved.

Finally, some method and argument names have been changed to be consistent between different classes. Also, the default value of arguments with the same name have also been unified.

The biggest TO DO we have are tests. Right now, we only have tests for the Jones_vector class. However, we thought that it would be useful to release this version so the community can use it.

NOTE: Due to the change of argument and method names, this version is not compatible with the previous ones.


0.2.2 (2019-09-04)
------------------
* Bug fixes.


0.2.1 (2019-09-04)
------------------
* Bug fixes.
* Solve incidents.
* Start to homogenize structures for both Jones and Stokes.


0.2.0 (2019-05-25)
------------------
pre-alpha state

* Upgrade to Python 3
* Stable version including tests


0.1.5 (2019-02-25)
------------------
* Jones_vector, Jones_matrix, Stokes works.
* Jones_vector: simplify function to represent better Jones vectors.
* tests drawing: Made tests for drawing

* Mueller is in progress.
* Functions = 9/10
* Documentation = 8/10
* Tutorial = 8/10.
* Examples = 8/10.
* Tests = 8/10
* Drawing = 10/10. Finished. Polarization ellipse for Jones and Stokes (partially random). Stokes on Poincaré sphere.


0.1.4 (2019-02-03)
------------------
* bug fixes


0.1.3 (2019-01-22)
------------------
* Fixed axis_equal issue.
* Jones_vector, Jones_matrix, Stokes works.
* Mueller is in progress.
* Functions = 9/10
* Documentation = 8/10
* Tutorial = 7/10.
* Examples = 6/10.
* Drawing = 0/10.


0.1.1 (2018-12-22)
------------------
* First release on PyPI in alpha state.


0.0.0 (2018-11-22)
------------------
First implementation of py_pol.

            

Raw data

            {
    "_id": null,
    "home_page": "https://bitbucket.org/optbrea/py_pol/src/master/",
    "name": "py-pol",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "py_pol,optics,polarization,Jones,Stokes,Mueller",
    "author": "Jesus del Hoyo Munoz / Luis Miguel Sanchez Brea",
    "author_email": "optbrea@ucm.es",
    "download_url": "https://files.pythonhosted.org/packages/ab/7f/33cbc3af13401d4849d278e0ad0cb2ea08d699b28c07957756eb1b4d9150/py_pol-1.1.3.tar.gz",
    "platform": null,
    "description": "========================\r\nPython polarization\r\n========================\r\n\r\n\r\n.. image:: https://img.shields.io/pypi/v/py_pol.svg\r\n        :target: https://pypi.org/project/py-pol/\r\n\r\n.. image:: https://img.shields.io/travis/optbrea/py_pol.svg\r\n        :target: https://bitbucket.org/optbrea/py_pol/src/master/\r\n\r\n.. image:: https://readthedocs.org/projects/py-pol/badge/?version=latest\r\n        :target: https://py-pol.readthedocs.io/en/master/\r\n        :alt: Documentation Status\r\n\r\n\r\n\r\n* Free software: MIT license\r\n* Documentation: https://py-pol.readthedocs.io\r\n\r\n.. image:: logo.png\r\n   :width: 75\r\n   :align: right\r\n\r\n\r\n\r\nFeatures\r\n--------\r\nPy-pol is a Python library for Jones and Stokes-Mueller polarization optics. It has 4 main modules:\r\n\r\n    * jones_vector - Light polarization states in Jones formalism (2x1 vectors).\r\n\r\n    * jones_matrix - Optical elements polarization properties in Jones formalism (2x2 matrices).\r\n\r\n    * stokes - Light polarization states in Mueller-Stokes formalism (4x1 vectors).\r\n\r\n    * mueller - Optical elements polarization properties in Mueller-Stokes formalism (4x4 matrices).\r\n\r\n\r\nEach one has its own class, with multiple methods for generation, operation and parameters extraction.\r\n\r\nExamples\r\n--------\r\n\r\nJones formalism\r\n===============\r\n\r\nGenerating Jones vectors and Matrices\r\n\r\n.. code-block:: python\r\n\r\n    from py_pol.jones_vector import Jones_vector\r\n    from py_pol.jones_matrix import Jones_matrix\r\n    from py_pol.utils import degrees\r\n\r\n    j0 = Jones_vector(\"j0\")\r\n    j0.linear_light(angle=45*degrees)\r\n\r\n    m0 = Jones_matrix(\"m0\")\r\n    m0.diattenuator_linear( p1=0.75, p2=0.25, angle=45*degrees)\r\n\r\n    m1 = Jones_matrix(\"m1\")\r\n    m1.quarter_waveplate(angle=0 * degrees)\r\n\r\n    j1=m1*m0*j0\r\n\r\nExtracting information form Jones Vector.\r\n\r\n.. code-block:: python\r\n\r\n    print(j0,'\\n')\r\n    print(j0.parameters)\r\n\r\n.. code-block:: python\r\n\r\n    j0 = [+0.707; +0.707]\r\n\r\n    parameters of j0:\r\n        intensity        : 1.000 arb.u\r\n        alpha            : 45.000 deg\r\n        delay            : 0.000 deg\r\n        azimuth          : 45.000 deg\r\n        ellipticity angle: 0.000 deg\r\n        a, b             : 1.000  0.000\r\n        phase            : 0.000 deg\r\n\r\n.. code-block:: python\r\n\r\n    print(j1,'\\n')\r\n    print(j1.parameters)\r\n\r\n.. code-block:: python\r\n\r\n        m1 * m0 @45.00 deg * j0 = [+0.530+0.000j; +0.000+0.530j]'\r\n\r\n        parameters of m1 * m0 @45.00 deg * j0:\r\n            intensity        : 0.562 arb.u\r\n            alpha            : 45.000 deg\r\n            delay            : 90.000 deg\r\n            azimuth          : 8.618 deg\r\n            ellipticity angle: -45.000 deg\r\n            a, b             : 0.530  0.530\r\n            phase            : 0.000 deg\r\n\r\nExtracting information form Jones Matrices.\r\n\r\n.. code-block:: python\r\n\r\n    print(m0,'\\n')\r\n    print(m0.parameters)\r\n\r\n.. code-block:: python\r\n\r\n        m0 @45.00 deg =\r\n              [+0.500, +0.250]\r\n              [+0.250, +0.500]\r\n\r\n        parameters of m0 @45.00 deg:\r\n            is_homogeneous: True\r\n            delay:          0.000 deg\r\n            diattenuation:  0.800\r\n\r\n\r\n.. code-block:: python\r\n\r\n\r\n    print(m1,'\\n')\r\n    print(m1.parameters)\r\n\r\n\r\n.. code-block:: python\r\n\r\n\r\n        m1 =\r\n              [+1+0j, +0+0j]\r\n              [+0+0j, +0+1j]\r\n\r\n        parameters of m1:\r\n            is_homogeneous: True\r\n            delay:          90.000 deg\r\n            diattenuation:  0.000\r\n\r\n\r\n\r\n\r\nStokes-Mueller formalism\r\n========================\r\n\r\nGenerating Stokes vectors and Mueller matrices.\r\n\r\n\r\n.. code-block:: python\r\n\r\n\r\n    from py_pol.stokes import Stokes\r\n    from py_pol.mueller import Mueller\r\n    from py_pol.utils import degrees\r\n\r\n    j0 = Stokes(\"j0\")\r\n    j0.linear_light(angle=45*degrees)\r\n\r\n    m1 = Mueller(\"m1\")\r\n    m1.diattenuator_linear(p1=1, p2=0, angle=0*degrees)\r\n\r\n    j1=m1*j0\r\n\r\n\r\nExtracting information from Stokes vectors.\r\n\r\nDetermining the intensity of a Stokes vector:\r\n\r\n.. code-block:: python\r\n\r\n    i1=j0.parameters.intensity()\r\n    print(\"intensity = {:4.3f} arb. u.\".format(i1))\r\n\r\n\r\n.. code-block:: python\r\n\r\n    intensity = 1.000 arb. u.\r\n\r\nDetermining all the parameters of a Stokes vector:\r\n\r\n.. code-block:: python\r\n\r\n\r\n    print(j0,'\\n')\r\n    print(j0.parameters)\r\n\r\n.. code-block:: python\r\n\r\n        j0 = [ +1;  +0;  +1;  +0]\r\n\r\n\r\n        parameters of j0:\r\n            intensity             : 1.000 arb. u.\r\n            amplitudes            : E0x 0.707, E0y 0.707, E0_unpol 0.000\r\n            degree polarization   : 1.000\r\n            degree linear pol.    : 1.000\r\n            degree   circular pol.: 0.000\r\n            alpha                 : 45.000 deg\r\n            delay                 : 0.000 deg\r\n            azimuth               : 45.000 deg\r\n            ellipticity  angle    : 0.000 deg\r\n            ellipticity  param    : 0.000\r\n            eccentricity          : 1.000\r\n            polarized vector      : [+1.000; +0.000; +1.000; +0.000]'\r\n            unpolarized vector    : [+0.000; +0.000; +0.000; +0.000]'\r\n\r\n.. code-block:: python\r\n\r\n\r\n    print(j1,'\\n')\r\n    print(j1.parameters)\r\n\r\n.. code-block:: python\r\n\r\n        m1 * j0 = [+0.500; +0.500; +0.000; +0.000]\r\n\r\n        parameters of m1 * j0:\r\n            intensity             : 0.500 arb. u.\r\n            amplitudes            : E0x 0.707, E0y 0.000, E0_unpol 0.000\r\n            degree polarization   : 1.000\r\n            degree linear pol.    : 1.000\r\n            degree   circular pol.: 0.000\r\n            alpha                 : 0.000 deg\r\n            delay                 : 0.000 deg\r\n            azimuth               : 0.000 deg\r\n            ellipticity  angle    : 0.000 deg\r\n            ellipticity  param    : 0.000\r\n            eccentricity          : 1.000\r\n            polarized vector      : [+0.500; +0.500; +0.000; +0.000]'\r\n            unpolarized vector    : [+0.000; +0.000; +0.000; +0.000]'\r\n\r\n\r\n\r\n\r\nExtracting information from Mueller matrices.\r\n\r\n.. code-block:: python\r\n\r\n    m2 = Mueller(\"m2\")\r\n    m2.diattenuator_retarder_linear(D=90*degrees, p1=1, p2=0.5, angle=0)\r\n    delay = m2.parameters.retardance()\r\n    print(\"delay = {:2.1f}\u00c2\u00ba\".format(delay/degrees))\r\n\r\n.. code-block:: python\r\n\r\n    delay = 90.0\u00c2\u00ba\r\n\r\nThere is a function in Parameters_Jones_Vector class, .get_all() that will compute all the parameters available and stores in a dictionary .dict_params(). Info about dict parameters can be revised using the print function.\r\n\r\n\r\n.. code-block:: python\r\n\r\n    print(m2,'\\n')\r\n    m2.parameters.get_all()\r\n    print(m2.parameters)\r\n\r\n\r\n.. code-block:: python\r\n\r\n        m2 =\r\n          [+0.6250, +0.3750, +0.0000, +0.0000]\r\n          [+0.3750, +0.6250, +0.0000, +0.0000]\r\n          [+0.0000, +0.0000, +0.0000, +0.5000]\r\n          [+0.0000, +0.0000, -0.5000, +0.0000]\r\n\r\n      Parameters of m2:\r\n          Transmissions:\r\n              - Mean                  : 62.5 %.\r\n              - Maximum               : 100.0 %.\r\n              - Minimum               : 25.0 %.\r\n          Diattenuation:\r\n              - Total                 : 0.600.\r\n              - Linear                : 0.600.\r\n              - Circular              : 0.000.\r\n          Polarizance:\r\n              - Total                 : 0.600.\r\n              - Linear                : 0.600.\r\n              - Circular              : 0.000.\r\n          Spheric purity              : 0.872.\r\n          Retardance                  : 1.571.\r\n          Polarimetric purity         : 1.000.\r\n          Depolarization degree       : 0.000.\r\n          Depolarization factors:\r\n              - Euclidean distance    : 1.732.\r\n              - Depolarization factor : 0.000.\r\n          Polarimetric purity indices:\r\n              - P1                    : 1.000.\r\n              - P2                    : 1.000.\r\n              - P3                    : 1.000.\r\n\r\nThere are many types of Mueller matrices. The Check_Mueller calss implements all the checks that can be performed in order to clasify a Mueller matrix. They are stored in the checks field of Mueller class.\r\n\r\n\r\n.. code-block:: python\r\n\r\n    m1 = Mueller(\"m1\")\r\n    m1.diattenuator_linear(p1=1, p2=0.2, angle=0*degrees)\r\n    print(m1,'\\n')\r\n\r\n    c1 = m1.checks.is_physical()\r\n    c2 = m1.checks.is_homogeneous()\r\n    c3 = m1.checks.is_retarder()\r\n    print('The linear diattenuator is physical: {}; hogeneous: {}; and a retarder: {}.'.format(c1, c2, c3))\r\n\r\n\r\n.. code-block:: python\r\n\r\n    m1 =\r\n      [+0.520, +0.480, +0.000, +0.000]\r\n      [+0.480, +0.520, +0.000, +0.000]\r\n      [+0.000, +0.000, +0.200, +0.000]\r\n      [+0.000, +0.000, +0.000, +0.200]\r\n\r\n\r\n    The linear diattenuator is physical: True; hogeneous: True; and a retarder: False.\r\n\r\nDrawings\r\n========\r\n\r\nThe modules also allows to obtain graphical representation of polarization.\r\n\r\nDrawing polarization ellipse for Jones vectors.\r\n\r\n.. image:: ellipse_Jones_1.png\r\n   :width: 600\r\n\r\n.. image:: ellipse_Jones_3.png\r\n   :width: 600\r\n\r\n\r\nDrawing polarization ellipse for Stokes vectors with random distribution due to unpolarized part of light.\r\n\r\n.. image:: ellipse_Stokes_1.png\r\n   :width: 600\r\n\r\n.. image:: ellipse_Stokes_2.png\r\n   :width: 600\r\n\r\nDrawing Stokes vectors in Poincare sphere.\r\n\r\n.. image:: poincare2.png\r\n   :width: 600\r\n\r\n.. image:: poincare3.png\r\n   :width: 600\r\n\r\n.. image:: poincare4.png\r\n   :width: 600\r\n\r\n\r\nAuthors\r\n-------\r\n.. image:: logoUCM.png\r\n   :width: 125\r\n   :align: right\r\n\r\n* Jesus del Hoyo <jhoyo@ucm.es>\r\n* Luis Miguel Sanchez Brea <optbrea@ucm.es>\r\n\r\n    **Universidad Complutense de Madrid**,\r\n    Faculty of Physical Sciences,\r\n    Department of Optics\r\n    Plaza de las ciencias 1,\r\n    ES-28040 Madrid (Spain)\r\n\r\nCiting\r\n------\r\n* J. Hoyo, L. M. Sanchez-Brea, A. Soria-Garcia, \"Open source library for polarimetric calculations \"py_pol\"\", Proc. SPIE 11875, Computational Optics 2021, 1187506 (14 September 2021); doi: 10.1117/12.2597163, https://spie.org/Publications/Proceedings/Paper/10.1117/12.2597163?SSO=1.\r\n* J. del Hoyo, L.M. Sanchez Brea, \"py-pol, Python module for polarization optics\", https://pypi.org/project/py-pol/ (2019)\r\n\r\nReferences\r\n----------\r\n\r\n* D. Goldstein \"Polarized light\" 2nd edition, Marcel Dekker (1993).\r\n\r\n* J. J. Gil, R. Ossikovsky \"Polarized light and the Mueller Matrix approach\", CRC Press (2016).\r\n\r\n* C. Brosseau \"Fundamentals of Polarized Light\" Wiley (1998).\r\n\r\n* R. Martinez-Herrero, P. M. Mejias, G. Piquero \"Characterization of partially polarized light fields\" Springer series in Optical sciences (2009).\r\n\r\n* J. M. Bennet \"Handbook of Optics 1\" Chapter 5 'Polarization'.\r\n\r\n* R. A. Chipman \"Handbook of Optics 2\" Chapter 2 'Polarimetry'.\r\n\r\n* S. Y. Lu and RA Chipman, \"Homogeneous and inhomogeneous Jones matrices\",  J. Opt. Soc. Am. A 11(2) 766 (1994).\r\n\r\n\r\n\r\n\r\nAcknowlegments\r\n--------------\r\nThis software was initially developed for the project Retos-Colaboraci\u00c3\u00b3n 2016 \"Ecograb\" (RTC-2016-5277-5) and \"Teluro-AEI\" (RTC2019-007113-3) of Ministerio de Econom\u00c3\u00ada y Competitivdad (Spain) and the European funds for regional development (EU), led by Luis Miguel Sanchez-Brea.\r\n\r\n\r\nCredits\r\n-------\r\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\r\n\r\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\r\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\r\n\r\n\r\n=======\r\nHistory\r\n=======\r\n\r\n1.1.3\r\n-----------------------\r\n* bugfix zeroslike\r\n* bugfix not taking shape = False as flatten the object.\r\n\r\n1.1.2\r\n-----------------------\r\n* bugfix Jones_vector.parameters.global_phase\r\n\r\n1.1.1\r\n-----------------------\r\n* from_list can also be used with lists of Py_pol objects, lists and tuples. Also, all elemeents may have more than one elemnt.\r\n* minor bugfixes\r\n\r\n\r\n1.1.0 (2022-3-31)\r\n-------------------\r\n* Added base class Py_pol\r\n* Objects are now iterable\r\n* 3D drawings changed to Plotly\r\n* New density and existence methods\r\n\r\n\r\n1.0.4 (2022-02-07)\r\n------------------\r\n* Bug fix related to variable limits\r\n\r\n1.0.4 (2021-07-19)\r\n------------------\r\n* Bug fixes\r\n\r\n\r\n1.0.3 (2021-01-22)\r\n------------------\r\n* Bug fixes\r\n\r\n\r\n1.0.2 (2020-07-04)\r\n--------------------\r\n* Implemented workaround of axis_equal issue.\r\n\r\n\r\n1.0.0 (2020-06-04)\r\n-------------------\r\npy_pol multidimensional. Alpha state\r\n\r\nThis is a big overhaul with many changes. All of them are based on the possibility of storing several vector/matrices in the same object. This reduces significantly the time required to perform the same operation to multiple vectors/matrices, using numpy methods instead of for loops. We have calculated that the reduction is around one order of magnitude.\r\n\r\nNew methods have been introduced. First, methods available for Mueller / Stoes modules have been created also for Jones (when possible). Also, some bugs and errors in the calculations have been solved.\r\n\r\nFinally, some method and argument names have been changed to be consistent between different classes. Also, the default value of arguments with the same name have also been unified.\r\n\r\nThe biggest TO DO we have are tests. Right now, we only have tests for the Jones_vector class. However, we thought that it would be useful to release this version so the community can use it.\r\n\r\nNOTE: Due to the change of argument and method names, this version is not compatible with the previous ones.\r\n\r\n\r\n0.2.2 (2019-09-04)\r\n------------------\r\n* Bug fixes.\r\n\r\n\r\n0.2.1 (2019-09-04)\r\n------------------\r\n* Bug fixes.\r\n* Solve incidents.\r\n* Start to homogenize structures for both Jones and Stokes.\r\n\r\n\r\n0.2.0 (2019-05-25)\r\n------------------\r\npre-alpha state\r\n\r\n* Upgrade to Python 3\r\n* Stable version including tests\r\n\r\n\r\n0.1.5 (2019-02-25)\r\n------------------\r\n* Jones_vector, Jones_matrix, Stokes works.\r\n* Jones_vector: simplify function to represent better Jones vectors.\r\n* tests drawing: Made tests for drawing\r\n\r\n* Mueller is in progress.\r\n* Functions = 9/10\r\n* Documentation = 8/10\r\n* Tutorial = 8/10.\r\n* Examples = 8/10.\r\n* Tests = 8/10\r\n* Drawing = 10/10. Finished. Polarization ellipse for Jones and Stokes (partially random). Stokes on Poincar\u00c3\u00a9 sphere.\r\n\r\n\r\n0.1.4 (2019-02-03)\r\n------------------\r\n* bug fixes\r\n\r\n\r\n0.1.3 (2019-01-22)\r\n------------------\r\n* Fixed axis_equal issue.\r\n* Jones_vector, Jones_matrix, Stokes works.\r\n* Mueller is in progress.\r\n* Functions = 9/10\r\n* Documentation = 8/10\r\n* Tutorial = 7/10.\r\n* Examples = 6/10.\r\n* Drawing = 0/10.\r\n\r\n\r\n0.1.1 (2018-12-22)\r\n------------------\r\n* First release on PyPI in alpha state.\r\n\r\n\r\n0.0.0 (2018-11-22)\r\n------------------\r\nFirst implementation of py_pol.\r\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Jones and Mueller polarization - Optics",
    "version": "1.1.3",
    "project_urls": {
        "Homepage": "https://bitbucket.org/optbrea/py_pol/src/master/"
    },
    "split_keywords": [
        "py_pol",
        "optics",
        "polarization",
        "jones",
        "stokes",
        "mueller"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b2f7ae1df86795da1909ecad40f9fab42b88a1eaebcfca3e5ddc9c75eaf4620",
                "md5": "e07c8527e453553ab3fd206c38cf7c99",
                "sha256": "fcd48878467cf98f47d868260fb54c97e095f78c878504a247635a8157409242"
            },
            "downloads": -1,
            "filename": "py_pol-1.1.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e07c8527e453553ab3fd206c38cf7c99",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 139234,
            "upload_time": "2023-09-06T14:43:29",
            "upload_time_iso_8601": "2023-09-06T14:43:29.291202Z",
            "url": "https://files.pythonhosted.org/packages/0b/2f/7ae1df86795da1909ecad40f9fab42b88a1eaebcfca3e5ddc9c75eaf4620/py_pol-1.1.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab7f33cbc3af13401d4849d278e0ad0cb2ea08d699b28c07957756eb1b4d9150",
                "md5": "2262917bc0daf49135ed959ca34637d4",
                "sha256": "3a1ceb4fe46dc543fd47c2789b704a23cfbcff7a14796a2f119e083648816c47"
            },
            "downloads": -1,
            "filename": "py_pol-1.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "2262917bc0daf49135ed959ca34637d4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12897766,
            "upload_time": "2023-09-06T14:43:33",
            "upload_time_iso_8601": "2023-09-06T14:43:33.387756Z",
            "url": "https://files.pythonhosted.org/packages/ab/7f/33cbc3af13401d4849d278e0ad0cb2ea08d699b28c07957756eb1b4d9150/py_pol-1.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-06 14:43:33",
    "github": false,
    "gitlab": false,
    "bitbucket": true,
    "codeberg": false,
    "bitbucket_user": "optbrea",
    "bitbucket_project": "py_pol",
    "lcname": "py-pol"
}
        
Elapsed time: 0.14330s