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:
charpoly: Characteristic Polynomial Testcholetsky: 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: DiattenuationMMD_Delta: DepolarizationMMD_LR: Linear RetardanceMMD_CR: Circular RetardanceMMD_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 pymueller
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 = pymueller.build_eigen_matrix(M)
if pymueller.choletsky(M):
print("Matrix passed the Cholesky test.")
if pymueller.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymueller-0.1.1.tar.gz.
File metadata
- Download URL: pymueller-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b7370fd90aa8eee127a5e27603f80fb768f52d316f739330fafc429b6c64346
|
|
| MD5 |
35f4f615f4e38680a0002f265402f066
|
|
| BLAKE2b-256 |
eb85a0ce2ed86122bd3791f2e00ab85e2953382acc84154ecd060f2e22598e1d
|
File details
Details for the file pymueller-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pymueller-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f419fbb84ab2fbf589c6f880af6217efa680097fcd386e8aa4f8372adf6d4b86
|
|
| MD5 |
480edd5beb9dc45b33e58112c4a447c0
|
|
| BLAKE2b-256 |
2a3406971a6c72b3818895fc776d09f62a3d1c0542b6bcdf55ffdff7ffd8541c
|