Metadata-Version: 2.1
Name: pylarization
Version: 0.2.1
Summary: Package for polarization state calculations
Home-page: https://gitlab.com/szuro/pylarization
Author: Robert Szulist
Author-email: r.szulist@gmail.com
License: UNKNOWN
Keywords: polarization light ellipse jones stokes mueller coherency
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/x-rst
Requires-Dist: numpy

Pylarization
============

About
-----
Pylarization is a Python module that aids in processing light
polarization states. For given method of polarization description it can 
calculate all parameters of a polarization ellipse.

Installation
------------

The following should do, as pylarization does not have any
platform-specific dependancies.

.. code-block:: sh

   pip install pylarization

Usage
-----

Polarization Ellipse
~~~~~~~~~~~~~~~~~~~~

PolarizationEllipse is the base class for all classes describing different 
methods of describing the state of polarization.

To create an instance it is necessary to supply light amplitudes along
the X and Y axes and the phase difference between the amplitudes.

.. code-block:: python

   light = PolarizationEllipse(0.445, 0.89, 1.57)


Vectors
~~~~~~~

Jones Vector
^^^^^^^^^^^^

.. code-block:: python

   light = JonesVector(0.445, 0.89j)

Stokes Vector
^^^^^^^^^^^^^

.. code-block:: python

   light = StokesVector(1, 0.6, 0, 0.8)

Matrices
~~~~~~~~

Jonex Matrix
^^^^^^^^^^^^

.. code-block:: python

   matrix_values = numpy.matrix([[1, 0], [0, -1j]])
   light = JonesMatrix(matrix_values) *  JonesVector(1, -1j)
   light.vector
   matrix([[ 1.+0.j],
           [-1.+0.j]])

Mueller Matrix
^^^^^^^^^^^^^^

.. code-block::

   matrix_values = numpy.matrix([[0.5, 0.5, 0, 0], [0.5, 0.5, 0, 0], [0 , 0, 0, 0], [0 , 0, 0, 0]])
   light = MuellerMatrix(matrix_values) *  StokesVector(1, 0, 0, 0)
   light.vector
   matrix([[0.5],
           [0.5],
           [0. ],
           [0. ]])

Coherency Matrix
^^^^^^^^^^^^^^^^

.. code-block:: python

   light = CoherencyMatrix(1, 0 ,0 ,0)

Sources
-------

All sources can be found `here <https://gitlab.com/szuro/pylarization/-/wikis/Sources>`_


