Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derivatives? #5

Open
realWDC opened this issue Nov 11, 2020 · 3 comments
Open

Derivatives? #5

realWDC opened this issue Nov 11, 2020 · 3 comments

Comments

@realWDC
Copy link

realWDC commented Nov 11, 2020

Thank you for your excellent works!
I searched and it seems Zernike derivatives have not yet been implemented. Any plans for that, or which part of the code could you suggest to modify for that purpose?

Thanks,
WDC

@jacopoantonello
Copy link
Owner

Hi! Yes, that'd be a useful feature. But at the moment I have no plans / time for it. There isn't support for that in the code. I guess the derivatives / integrals can themselves be expanded in Zernike coefficients. So some methods should be added that compute the vector of Zernike coefficients for the derivative out of a given vector of the coefficients of the original function to derive. Something like (zc_dx, zc_dy) = rzern.derivative(zc).

@realWDC
Copy link
Author

realWDC commented Nov 17, 2020

Thank you for the reply! That is exactly how I ended up with.

Based on your code, I have implemented a derivative version for the real Zernike case. The idea is to have additional functions that:

  • dZk_dr(): Computes the derivatives of Zk w.r.t. rho, which involves derivatives of radial() function.
  • dZk_dtheta(): Computes the derivaives of Zk w.r.t. theta, which involves derivatives of angular() function.
  • Combine dZk_dr and dZk_dtheta in a chain-rule sensoe to complish the full derivatives w.r.t. x and y.

I will likely submit a PR in near future when I have time to test it thoroughly ...

@sidgairo18
Copy link

@realWDC could you please share the above.
@jacopoantonello @realWDC also is there an existing implementation to compute the Curvature at a given point?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants