Skip to content

Commit bc2d2c1

Browse files
fix: use absolute value of m in sine calculation for Zernike polynomials
1 parent 093e1ca commit bc2d2c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

optiland/zernike.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def _azimuthal_term(self, m=0, phi=0):
129129
if m >= 0:
130130
return np.cos(m * phi)
131131
else:
132-
return np.sin(m * phi)
132+
return np.sin(np.abs(m) * phi)
133133

134134
def _norm_constant(self, n=0, m=0):
135135
"""Calculate the normalization constant of the Zernike polynomial.

0 commit comments

Comments
 (0)