Skip to main content

Tools and functions for 4x4 Mueller matrices

Project description

Tools for Mueller Matrices

A collection of functions to manipulate and process Mueller matrix data.

1. Physical Realizability Test

This package provides functions to test the physical realizability of 4×4 Mueller matrices. The original code, written in C++ and Julia, can be found here.

The prtest functions offer several options for physical realizability tests. These functions accept a [4,4] matrix representing a Mueller matrix. If the test is passed, the function returns True.

Available Test Methods:

  1. charpoly: Characteristic Polynomial Test
  2. choletsky: Cholesky Decomposition Test

Performance benchmarks and detailed implementations can be found in the original repository.

2. Decomposition

This package also allows decomposition of a Mueller matrix into optical parameters, including:

  • MMD_D: Diattenuation
  • MMD_Delta: Depolarization
  • MMD_LR: Linear Retardance
  • MMD_CR: Circular Retardance
  • MMD_psi: Orientation

Currently, the only available decomposition method is the Lu-Chipman decomposition.

How to Run

First, install and import the necessary modules:

pip install pymueller

import pymueller
import muellerphys
### Example Usage
```python
import numpy as np
import muellerphys

M = np.array([
    [1, 0, 0, 0],
    [0, 1, 0, 0],
    [0, 0, 1, 0],
    [0, 0, 0, 1]
])

# Using the physical realizability test functions
H = py.build_eigen_matrix(M)

if py.choletsky(M):
    print("Matrix passed the Cholesky test.")

if py.charpoly(M):
    print("Matrix is physically realizable.")

# Using the decomposition functions
MMD_D, MMD_Delta, MMD_LR, MMD_CR, MMD_psi = pymueller.lu_chipman(M)
print("Diattenuation:", MMD_D)
print("Depolarissation:", MMD_Delta)
print("Linear Retardance:", MMD_LR)
print("Circular Retardance:", MMD_CR)
print("Orientation:", MMD_psi)

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

pymueller-0.1.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymueller-0.1.0-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file pymueller-0.1.0.tar.gz.

File metadata

  • Download URL: pymueller-0.1.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for pymueller-0.1.0.tar.gz
Algorithm Hash digest
SHA256 032953a2c64fbab8bbc9898e9db881e6a59b7dc5c1b5ea06bb7d23755cad1592
MD5 df8df5fd42e4a491789b33166d0794ea
BLAKE2b-256 b8275dc43d209013ec056b2cbbb1b6016d0bbd787caa807dba732131e16c4e25

See more details on using hashes here.

File details

Details for the file pymueller-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pymueller-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for pymueller-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c864c843bd4c58e4319705f8065f3aeb04c39a5c0494023227e7bb34e3353376
MD5 f78b96c64c916ceb2bf3e6673ec30b74
BLAKE2b-256 3b24c03163c8661020eb98a3e98d6412a89337703a58f84581ced97f3dd01f71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page