Skip to content

Commit

Permalink
fix Mueller
Browse files Browse the repository at this point in the history
  • Loading branch information
scottprahl committed Jun 5, 2024
1 parent 68aed85 commit 7a72f3c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 10 deletions.
17 changes: 11 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,22 +117,27 @@ will produce
.. image:: https://raw.githubusercontent.com/scottprahl/pypolar/main/docs/poincare1.svg
:width: 700px

Create an optical isolator::
Mueller Matrix version
----------------------

.. code-block:: python
import numpy as np
import pypolar.mueller as mueller
# Optical Isolator example, no light returning
A = mueller.stokes_right_circular() # incident light
B = mueller.op_linear_polarizer(np.pi/4) # polarizer at 45°
C = mueller.op_quarter_wave_plate(0) # QWP with fast axis horizontal
D = mueller.op_mirror() # first surface mirror
E = mueller.op_quarter_wave_plate(0) # QWP still has fast axis horizontal
F = mueller.op_linear_polarizer(-np.pi/4) # now at -45° because travelling backwards
F = mueller.op_linear_polarizer(-np.pi/4) # blocks at -45° travelling backwards
F @ E @ D @ C @ B @ A
produces

.. code-block:: python
array([0., 0., 0., 0.])
License
-------
Expand Down
22 changes: 21 additions & 1 deletion docs/06-Mueller-Matrices.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,26 @@
"mueller.intensity(F @ E @ D @ C @ B @ A)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([0., 0., 0., 0.])"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"F @ E @ D @ C @ B @ A"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -581,7 +601,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.12.3"
},
"toc": {
"nav_menu": {},
Expand Down
2 changes: 1 addition & 1 deletion docs/07-Fresnel-Reflection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.12.3"
},
"toc": {
"nav_menu": {},
Expand Down
4 changes: 2 additions & 2 deletions docs/08-Fresnel-Rhomb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -507,7 +507,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.1"
"version": "3.12.3"
},
"toc": {
"nav_menu": {},
Expand Down

0 comments on commit 7a72f3c

Please sign in to comment.