Polarization¶
polarization ¶
Polarization optics: Jones-calculus building blocks and Mask subclasses that act on a Beam's (Ex, Ey) transverse field components.
Jones matrices here follow the convention
[Ex'] [J00 J01] [Ex]
[Ey'] = [J10 J11] [Ey]
JonesMask wraps a 2x2 Jones matrix as a Mask (see structured_optics.masks)
so it can be applied to a Beam the same way spatial masks are, e.g.:
beam = beam * Polarizer(angle=0, proj="H") * QWP(angle=np.pi/4)
HPROJ
module-attribute
¶
HPROJ = np.array([[1, 0], [0, 0]], dtype='complex')
np.ndarray: Jones projector onto horizontal linear polarization.
VPROJ
module-attribute
¶
VPROJ = np.array([[0, 0], [0, 1]], dtype='complex')
np.ndarray: Jones projector onto vertical linear polarization.
DPROJ
module-attribute
¶
DPROJ = np.array([[1, 1], [1, 1]], dtype='complex') / 2
np.ndarray: Jones projector onto diagonal (+45 deg) linear polarization.
APROJ
module-attribute
¶
APROJ = np.array([[1, -1], [-1, 1]], dtype='complex') / 2
np.ndarray: Jones projector onto anti-diagonal (-45 deg) linear polarization.
RPROJ
module-attribute
¶
RPROJ = np.array([[1, 1j], [-1j, 1]], dtype='complex') / 2
np.ndarray: Jones projector onto right-circular polarization.
LPROJ
module-attribute
¶
LPROJ = np.array([[1, -1j], [1j, 1]], dtype='complex') / 2
np.ndarray: Jones projector onto left-circular polarization.
JonesMask ¶
Bases: Mask
A Mask defined by a 2x2 Jones matrix, acting on (Ex, Ey) only.
Subclasses implement matrix(beam); Ez (if present) is left untouched.
matrix
abstractmethod
¶
matrix(beam) -> np.ndarray
Return the 2x2 Jones matrix to apply to beam's (Ex, Ey).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
beam
|
Beam
|
The beam the matrix will be applied to. Provided so subclasses can compute a matrix that depends on beam state. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
A 2x2 (possibly complex) Jones matrix. |
Source code in structured_optics\polarization.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
apply ¶
apply(beam)
Apply this Jones matrix to a copy of beam's Ex/Ey components.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
beam
|
Beam
|
The beam to transform. If |
required |
Returns:
| Type | Description |
|---|---|
Beam
|
|
Source code in structured_optics\polarization.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
HWP ¶
HWP(angle: float)
Bases: JonesMask
A half-wave plate, oriented with its fast axis at angle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
angle
|
float
|
Orientation of the fast axis, in radians. |
required |
Source code in structured_optics\polarization.py
176 177 178 179 180 181 182 183 | |
matrix ¶
matrix(beam)
Return the half-wave plate's Jones matrix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
beam
|
Beam
|
Unused; accepted to satisfy the |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
The result of |
Source code in structured_optics\polarization.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
QWP ¶
QWP(angle: float)
Bases: JonesMask
A quarter-wave plate, oriented with its fast axis at angle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
angle
|
float
|
Orientation of the fast axis, in radians. |
required |
Source code in structured_optics\polarization.py
204 205 206 207 208 209 210 211 | |
matrix ¶
matrix(beam)
Return the quarter-wave plate's Jones matrix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
beam
|
Beam
|
Unused; accepted to satisfy the |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
The result of |
Source code in structured_optics\polarization.py
213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
Polarizer ¶
Polarizer(angle: float = 0, proj: str = 'H')
Bases: JonesMask
An ideal linear or circular polarizer, oriented at angle and
projecting onto the polarization state named by proj.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
angle
|
float
|
Rotation applied to the base projector, in radians. Defaults to 0. |
0
|
proj
|
str
|
Polarization state to project onto before rotation. One of
"H", "V", "D", "A", "R", "L" (see |
'H'
|
Source code in structured_optics\polarization.py
233 234 235 236 237 238 239 240 241 242 243 244 245 | |
matrix ¶
matrix(beam)
Return the polarizer's Jones matrix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
beam
|
Beam
|
Unused; accepted to satisfy the |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
The result of rotating |
Source code in structured_optics\polarization.py
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
J_rot ¶
J_rot(matrix, ang)
Rotate a Jones matrix about the optical axis by ang.
Applies the similarity transform R(ang) @ matrix @ R(ang)^H, where
R(ang) is the standard 2x2 rotation matrix and ^H denotes the
conjugate transpose. This is the general way to express any Jones
element (retarder, projector, etc.) at an arbitrary orientation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
matrix
|
ndarray
|
2x2 Jones matrix to rotate, expressed in the element's own (unrotated) basis. |
required |
ang
|
float
|
Rotation angle, in radians. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
The rotated 2x2 Jones matrix. |
Source code in structured_optics\polarization.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
J_phase_retarder ¶
J_phase_retarder(delta)
Build the Jones matrix of a linear phase retarder in its own basis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
delta
|
float
|
Retardance between the fast and slow axes, in radians. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
The 2x2 diagonal Jones matrix
|
Source code in structured_optics\polarization.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
J_hwp ¶
J_hwp(ang)
Build the Jones matrix of a half-wave-plate-type retarder at angle ang.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ang
|
float
|
Orientation of the retarder's fast axis, in radians. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
The 2x2 Jones matrix from rotating |
Source code in structured_optics\polarization.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | |
J_qwp ¶
J_qwp(ang)
Build the Jones matrix of a quarter-wave-plate-type retarder at angle ang.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ang
|
float
|
Orientation of the retarder's fast axis, in radians. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
The 2x2 Jones matrix from rotating |
Source code in structured_optics\polarization.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |