This commit is contained in:
Abe Levitan
2021-08-03 19:34:08 -04:00
parent 332541c951
commit 061b7f647a
+1 -1
View File
@@ -29,7 +29,7 @@ def apply_linear_polarizer(probe, polarizer, multiple_modes=True, transpose=True
(N)(P)x2x1xMxL
"""
if len(polarizer) == 1:
if len(polarizer.shape) == 1:
theta = math.radians(polarizer)
jones_matrices = t.tensor([[(cos(theta)) ** 2, sin(2 * theta) / 2], [sin(2 * theta) / 2, sin(theta) ** 2]]).to(dtype=t.cfloat)
else: