octave-maintainers
[Top][All Lists]

## A new function for the Optics package

 From: Jose Ramom Flores das Seixas Subject: A new function for the Optics package Date: Sun, 21 Jul 2019 17:38:47 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

 Hi: I have written a function that could be incorporated to the optics package. This new function calculates the Zernike polynomials and their partial derivatives in Cartesian coordinates, using a recursive algorithm described in reference [1]. I'm sending an attachment with three files: zernikes_and_derivatives_cartesian_OSA.m, it is the main function zernike_osa_ansi_to_mn.m, it's a small function needed by the main function. It is similar to zernike_noll_to_mn.m, part of package optics, but for "OSA/ANSI standard indices" instead of "Noll's sequential indices". Zernikes_cartesian_OSA.pdf, where the recurrence relations are explained, as well as the modifications to these relations that I have made to accommodate the standard OSA. I wrote this file for those who want to understand the algorithm used. It's the first time I've sent anything, so it's possible there was some loose end left. The main function has been checked by comparing it with the explicit expressions of the Zernike polynomials, and their partial derivatives, and the results obtained are coherent. I.e. the differences are either zero or very small, in the order of 1e-14. I also compared my function with zernike_cartesian.m, a function of the optics package written by Andreas Weber. The differences are either zero or very small. To my disappointment, the average execution times are similar. So the main improvement that introduces my function is the calculation of partial derivatives. [1] Andersen T.B., Efficient and robust recurrence relations for the Zernike circle polynomials and their derivatives in Cartesian coordinates. Optic Express 26 (15), 18878-18896 (2018). Surely yours JosÃ© Ramom

Zernikes_and_derivatives_Cartesian_OSA.zip
Description: Zip archive