Skip to main content

Package for polarization state calculations

Project description

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.

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.

light = PolarizationEllipse(0.445, 0.89, 1.57)

Vectors

Jones Vector

light = JonesVector(0.445, 0.89j)

Stokes Vector

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

Matrices

Jonex Matrix

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

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

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

Sources

All sources can be found here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylarization-0.2.1.tar.gz (6.6 kB view hashes)

Uploaded source

Built Distribution

pylarization-0.2.1-py3-none-any.whl (9.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page