Closed mperrin closed 6 years ago
Comment by josePhoenix Thursday Sep 03, 2015 at 19:17 GMT
Can confirm that at least tip/tilt are swapped: zernike.noll_indices(2)
returns (1, 1)
when it should be (1, -1)
for the first entry on the second row of the triangle. Everything else looks fine up to Z_15
Comment by mperrin Thursday Sep 03, 2015 at 19:27 GMT
I am confused.
Both wikipedia (https://en.wikipedia.org/wiki/Zernike_polynomials#Noll.27s_sequential_indices) and the Online Encyclopedia of Integer Sequences (https://oeis.org/A176988) indicate a mapping of j=2 --> (n,m) = (1,1). I.e. those agree with what is currently coded in poppy.
What reference are you using for j=2 --> (1, -1) ?
Comment by mperrin Thursday Sep 03, 2015 at 19:31 GMT
See also:
In [7]: poppy.zernike.noll_indices(2)
Out[7]: (1, 1)
In [8]: poppy.zernike.str_zernike(1,1)
Out[8]: '\\sqrt{4}* ( 1 r^1 ) * \\cos(1 \\theta)'
This agrees with the definition for $Z_2 = 2 r \cos \theta$ given in Table 1 of Noll 1976. See the following horrible URL:
Comment by josePhoenix Thursday Sep 03, 2015 at 19:33 GMT
Ah, Wikipedia is not in agreement with itself. I was going off what Anand said and this figure: https://upload.wikimedia.org/wikipedia/commons/9/9f/ZernikePolynome6.svg
Comment by mperrin Thursday Sep 03, 2015 at 19:39 GMT
Argh. Perhaps the appropriate bug fix here is replacing that figure on wikipedia?
Wait, ha, if you click through to the figure page, the caption has an erratum that the Noll indices for tip and tilt are interchanged. See https://en.wikipedia.org/wiki/Zernike_polynomials#/media/File:ZernikePolynome6.svg
Yeah that should just flat out be fixed on wikipedia. Do you want to edit the svg or shall I?
Comment by josePhoenix Thursday Sep 03, 2015 at 19:44 GMT
I can do it. Took me a minute to find my login info.
Comment by josePhoenix Thursday Sep 03, 2015 at 19:55 GMT
Ugh, uploading proves more complicated than anticipated.
Comment by josePhoenix Thursday Sep 03, 2015 at 19:58 GMT
https://commons.wikimedia.org/wiki/Commons:FAQ#How_can_I_upload_a_new_version_of_a_file.3F
Guess I'll check back next week!
Comment by josePhoenix Monday Sep 21, 2015 at 21:57 GMT
Fixed the picture on Wikipedia (and the copy I pinned to my wall)
Issue by josePhoenix Monday Aug 31, 2015 at 18:29 GMT Originally opened as https://github.com/mperrin/poppy/issues/112
Anand says tip and tilt are swapped, and maybe entries on lower rows of the Zernike pyramid as well. Note to self to check this and see if I can reproduce.