The polynomials generated by orthopy are not in accordance to the formal definition of the zernikes.
For example, $Z_{1}^{1} $ should be $2 \rho \cos \phi $ but the orthopy generated polynomial looks like $-2\rho \cos \phi $.
This is an issue with all polynomials with azimuthal degree $m > 0$. Sadly, I do not fully understand the source code, so I can not easily spot the mistake.
An easy fix could be multiplying every output polynomial where $m > 0 $ by $-1 $ where $m $ can be calculated from the OSA/ANSI index $j $ (which I believe to be self.L in the zernike.py) by
The polynomials generated by orthopy are not in accordance to the formal definition of the zernikes.
For example, $Z_{1}^{1} $ should be $2 \rho \cos \phi $ but the orthopy generated polynomial looks like $-2\rho \cos \phi $.
This is an issue with all polynomials with azimuthal degree $m > 0$. Sadly, I do not fully understand the source code, so I can not easily spot the mistake.
An easy fix could be multiplying every output polynomial where $m > 0 $ by $-1 $ where $m $ can be calculated from the OSA/ANSI index $j $ (which I believe to be
self.L
in the zernike.py) by