You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The make_zernike_basis has a divide by zero error when used with a grid that has 0 as grid point.
The specific line that is causing the issue is line 139 in zernike.py in the function zernike_radial.
The line with h3 / r2 is creates a NaN if zero is included as grid point.
This does not happen analytically because the limit r->0 converges, just like the sinc function.
We evaluate all polynomials numerically so there are no analytical formulas for the zero point.
I have not read the paper yet that the documentation quotes. Maybe they propose a solution for this.
A quick and dirty fix is to shift the grid by a small amount. I used a 1 um shift for a grid of 10m in diameter.
The text was updated successfully, but these errors were encountered:
The new recurrence relation does not include 1/r^2 terms because it starts at lowest order and works towards the higher order modes. I will implement the new recurrence relation and compare the two.
The make_zernike_basis has a divide by zero error when used with a grid that has 0 as grid point.
The specific line that is causing the issue is line 139 in zernike.py in the function zernike_radial.
The line with h3 / r2 is creates a NaN if zero is included as grid point.
This does not happen analytically because the limit r->0 converges, just like the sinc function.
We evaluate all polynomials numerically so there are no analytical formulas for the zero point.
I have not read the paper yet that the documentation quotes. Maybe they propose a solution for this.
A quick and dirty fix is to shift the grid by a small amount. I used a 1 um shift for a grid of 10m in diameter.
The text was updated successfully, but these errors were encountered: